gpt4 book ai didi

ios - iOS 中 UIScrollView 内内容的高度

转载 作者:行者123 更新时间:2023-11-30 12:26:18 25 4
gpt4 key购买 nike

我知道它一定存在,但我似乎找不到它。我有一个可滚动的表格 View ,我想找到 ScrollView 之外的总表格 View 的高度。换句话说...该 TableView 上最后一行的 maxY 。有人知道我该怎么做吗?

原因:我有自动拖动功能,并且我想在到达表格中的最后一项时停止自动拖动。

欢迎回答或其他想法。

最佳答案

使用此方法,可以到达tableview的最后一行

 override func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {
let lastElement = dataSource.count - 1
if indexPath.row == lastElement {
// now you are on last item..
}
}

关于ios - iOS 中 UIScrollView 内内容的高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44166436/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com