SORU
28 ŞUBAT 2011, PAZARTESİ


Nasıl iPhone altına gidin UİTableView ne zaman bilmek

Benim gibi bir UITableView mi kaydırmak için alt sipariş için yük ve daha fazla içerik, sanki bir temsilci veya başka bir şey için izin denetçi bunu yaparken tablo yaptı kaydırmak için alt.

Herkes bu, bana, teşekkürler yardım lütfen şimdiden biliyor mu!

CEVAP
11 NİSAN 2011, PAZARTESİ


tableview temsilci yapmak böyle bir şey

- (void)scrollViewDidScroll:(UIScrollView *)aScrollView {
    CGPoint offset = aScrollView.contentOffset;
    CGRect bounds = aScrollView.bounds;
    CGSize size = aScrollView.contentSize;
    UIEdgeInsets inset = aScrollView.contentInset;
    float y = offset.y   bounds.size.height - inset.bottom;
    float h = size.height;
    // NSLog(@"offset: %f", offset.y);   
    // NSLog(@"content.height: %f", size.height);   
    // NSLog(@"bounds.height: %f", bounds.size.height);   
    // NSLog(@"inset.top: %f", inset.top);   
    // NSLog(@"inset.bottom: %f", inset.bottom);   
    // NSLog(@"pos: %f of %f", y, h);

    float reload_distance = 10;
    if(y > h   reload_distance) {
        NSLog(@"load more rows");
    }
}

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Djbasilio AuToBaSs

    Djbasilio Au

    20 Aralık 2008
  • DJPixcell

    DJPixcell

    20 NİSAN 2007
  • Matthew Morrill

    Matthew Morr

    15 EKİM 2011