UIRefreshControl - beginRefreshing not working when UITableViewController is inside UINavigationController

后端 未结 15 779
梦如初夏
梦如初夏 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 04:06

    For Swift 4/4.1

    A mix of existing answer do the job for me:

    refreshControl.beginRefreshing()
    tableView.setContentOffset(CGPoint(x: 0, y: tableView.contentOffset.y - (refreshControl.frame.size.height)), animated: true)
    

    Hope this helps!

提交回复
热议问题