我试图在我的UITableViewController中使用UITableViewController,它本身位于UINavigationController中,它的hidesNavigationBar属性设置为NO (因此导航条是可见的)。
UIRefreshControl工作,但被UINavigationBar模糊了。我很惊讶我找不到其他遇到这个问题的人。
可能的相关要点:
我将rootViewController of my UIWindow设置为my UINavigationController。
我通过设置UINavigationController的viewControll
这样做的目的是让搜索视图进入UICollectionView,并且仍然能够使用pull来使用UIRefreshControl刷新。在用户向下滚动UIRefreshControl之前,搜索和UICollectionView是不可见的。
------------------
| Pull To Refresh |
------------------
| Search |
------------------ <--- Above of this line the content is hidden
| A | B |
--------------
嗨,我正在尝试让一个UIRefreshControl与RxSwift一起工作。因此,我使用的是RxSwift示例中的。
在我的viewModel中,我有以下函数和变量来获取数据。
// MARK: - Variables
var data = Variable<[Data]>([])
// MARK: - Public Interface
func getData() {
let request = Data.readAll()
_ = request.rxResult().subscribe(onNext: { response in
sel
我需要实现水平UICollectionView。有时,我需要更新数据,所以我决定实现一个refreshcontrol。
我和refreshcontrol一起给reloadData()打电话了。它似乎可以工作,但是cellForItemAt没有被称为正确的时间。因此,当单元计数发生变化时,它将崩溃。
class ViewController: UIViewController, UICollectionViewDelegate {
@IBOutlet weak var collectionView: UICollectionView!
private let refresh