使用大标题时,不会触发UIScrollView中的UIRefreshControl

时间:2019-03-13 12:20:21

标签: ios objective-c cocoa-touch uiscrollview uirefreshcontrol

当我在导航栏中使用大标题时,下拉时不会触发为UIScrollView添加的UIRefresh控件

{
    self.scrollView.refreshControl = [[UIRefreshControl alloc] init];
    [self.scrollView bringSubviewToFront:self.scrollView.refreshControl];
    // add target
}

当我使用普通的小标题时,它会通过触发事件开始工作

如何使用大标题?

enter image description here

1 个答案:

答案 0 :(得分:1)

前段时间我遇到了同样的问题,对我来说,可以通过在scrollView.refreshControl.didMoveToSuperview()中调用viewDidAppear来使其正常工作。