本文介绍了我如何“隐藏”一个UIRefreshControl?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时我的表视图不会连接到要刷新的服务,在这种情况下,我不希望UIRefreshControl存在。

Occasionally my table view won't be connected to a service to refresh, and in that case, I don't want the UIRefreshControl to be present.

之后我在viewDidLoad中添加它,我试图在某些情况下使用 setEnabled: setHidden:隐藏它但似乎都没有工作。

After I add it in viewDidLoad, I've tried hiding it under certain circumstances with setEnabled: and setHidden: but neither seems to work.

推荐答案

尝试将表视图控制器的 refreshControl 属性设置为没有。

Try setting your table view controller's refreshControl property to nil.

这篇关于我如何“隐藏”一个UIRefreshControl?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 23:49