Swift - UITableView滚动事件 [英] Swift - UITableView scroll event

查看:111
本文介绍了Swift - UITableView滚动事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何检测 UITableView 是否滚动(向上或向下)。
UITableView 滚动时,我想隐藏键盘self.view.endEditing(true)

I was wondering how to detect if the UITableView is scrolled (up or down). I want to hide the keyboard when the UITableView is scrolled with self.view.endEditing(true).

提前感谢

推荐答案

您可以添加 UIScrollViewDelegate 。之后,您可以实现 scrollViewDidScroll 方法。

You can add UIScrollViewDelegate. After that you can implement scrollViewDidScroll method.

这篇关于Swift - UITableView滚动事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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