当我滚动到表格视图的底部时,最后一个元素(打算作为页脚)与tableview对象一起反弹。
有没有办法可以制作这个最后的项目/页脚项目,当它到达时会固定在屏幕的底部?
答案 0 :(得分:0)
You can use below Method, in this way, when you go down in UITableView ,
at that time Stop or turn off bouncing all together?
e.g. .bounces=NO; .alwaysBounceVertical=NO
otherwise Set Yes To all.
this way may be helpful to you.
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{
NSLog(@"scrollView.contentOffset.y-%f",scrollView.contentOffset.y);
NSLog(@"tblView.contentSize.height=%f",tblView.contentSize.height-tblView.frame.size.height);
if ([scrollView isKindOfClass:[UITableView class]])
{
if(scrollView.contentOffset.y == tblView.contentSize.height-tblView.frame.size.height)
{
// we are at the end
//Sp do wahtever want to do here.
//set bounce no
}
else
{
//not at END.
//set bounce Yes
}
}
}