怎样判断tableview是否滚动到底部?
解决方案 »
- app在运行过程中隐藏状态栏但存在了黑影该怎么去除??
- IOS项目如何导入包
- (发分啦,水底一个,谁就得分)动画背景是黑色的我该怎么改动呢
- 哎.. 困扰我几天了 有高手请进 谢谢
- 把String时间转换成 NSDate问题
- 使用 UIImageJPEGRepresentation block
- ios 中播放rtsp 视频流
- Student * stu = [[Student alloc]init]; //用类方法初始化
- PC蓝牙搜索不到苹果手机蓝牙(已开启),怎么破?
- iOS编程中ui table view和ui table view cell之间是什么关系?
- 非常好的iphone游戏开发资料
- 如何将untitled.plist中的信息放到tablevie中呢??
in the tableview delegate do something like this- (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");
}
}