【发布时间】:2016-11-09 02:49:58
【问题描述】:
我有一个UICollectionView,我想在其中集成一个UIRefreshControl,以使用户能够向下滑动以刷新。
假设我的UICollectionView 中有 5 个项目。如果我在 iPhone5 上运行我的应用程序,那么UIRefreshControl 工作得很好。但是,如果我在 iPhone6Plus 中运行它(所有 5 个项目都适合屏幕),UIRefreshControl 就不再工作了;我什至不能向下滑动它。
UIRefreshControl 中是否有任何属性可以帮助用户在任何情况下向下滑动,无论屏幕大小是多少?我查看了下面的 UIRefreshControl 类,但似乎这些无济于事:
public init()
open var isRefreshing: Bool { get }
open var tintColor: UIColor!
open var attributedTitle: NSAttributedString?
// May be used to indicate to the refreshControl that an external event has initiated the refresh action
@available(iOS 6.0, *)
open func beginRefreshing()
// Must be explicitly called when the refreshing has completed
@available(iOS 6.0, *)
open func endRefreshing()
一个丑陋的解决方案是制作一个我不想要的刷新按钮。
你有什么想法吗?
提前致谢
【问题讨论】:
标签: ios swift3 screen uirefreshcontrol