有没有一种方法可以模拟UIScrollView中的scrollViewDidScrollToBottom? [英] Is there a way to simulate a scrollViewDidScrollToBottom in UIScrollView?

查看:42
本文介绍了有没有一种方法可以模拟UIScrollView中的scrollViewDidScrollToBottom?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 UITableViewController 上进行无限滚动,我正在使用 scrollViewDidScroll:方法检查contentOffset,但是我无法深入了解 ScrollView底部的偏移量.

I would like to make an infinite scrolling on a UITableViewController, I'm using the scrollViewDidScroll: method to check the contentOffset, however I'm not able to drill down an offset that would be the bottom of the ScrollView.

有什么建议吗?

先谢谢了.

推荐答案

假设contentSize.height> bounds.size.height

Assuming contentSize.height > bounds.size.height

if ( contentOffset.y >= contentSize.height - bounds.size.height ) { ... }

这篇关于有没有一种方法可以模拟UIScrollView中的scrollViewDidScrollToBottom?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆