UIRefreshControl - beginRefreshing not working when UITableViewController is inside UINavigationController

后端 未结 15 783
梦如初夏
梦如初夏 2020-11-28 03:03

I\'ve setup a UIRefreshControl in my UITableViewController (which is inside a UINavigationController) and it works as expected (i.e. pull down fires the correct event). Howe

15条回答
  •  孤城傲影
    2020-11-28 03:50

    The already mentioned approach:

    [self.refreshControl beginRefreshing];
     [self.tableView setContentOffset:CGPointMake(0, self.tableView.contentOffset.y-self.refreshControl.frame.size.height) animated:YES];
    

    would make the spinner visible. But it wouldn't animate. The one thing I changed is the order of these two methods and everything worked:

    [self.tableView setContentOffset:CGPointMake(0, self.tableView.contentOffset.y-self.refreshControl.frame.size.height) animated:YES];
    [self.refreshControl beginRefreshing];
    

提交回复
热议问题