zoukankan      html  css  js  c++  java
  • iOS scrollView/tableView滚动到底部

    //项目要求tableView滚动到底部就自动加载下一页,UITableView继承自UIScrollView 所以可以在
    //
    scrollViewDidEndDecelerating这个方法中进行判断操作

    1
    -(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{ 2 if (scrollView == myScrollView) { 3 CGPoint offset = myScrollView.contentOffset; 4 CGRect bounds = myScrollView.bounds; 5 CGSize size = myScrollView.contentSize; 6 UIEdgeInsets inset = myScrollView.contentInset; 7 float y = offset.y + bounds.size.height - inset.bottom; 8 float h = size.height; 9 10 if((int)y == (int)h ) { //滑动到底部 11 12 //执行加载下一页 13 14 } 15 } 16 }
  • 相关阅读:
    markdown keynote
    pyecharts
    运行成功
    python发邮件3
    python发邮件2
    python发邮件1
    python发邮件
    python中的编码声明
    auther tonyxiao
    111
  • 原文地址:https://www.cnblogs.com/sun-wsh/p/5740389.html
Copyright © 2011-2022 走看看