Programmatically force a UIScrollView to stop scrolling, for sharing a table view with multiple data sources

前端 未结 10 927
醉话见心
醉话见心 2020-12-08 03:04

I have a UITableView whose data source and delegate are switched between a couple of custom data source objects when the user touches a segmented control (think \"Top Paid\"

10条回答
  •  有刺的猬
    2020-12-08 03:47

    You could try doing

    tableView.scrollEnabled = NO;
    tableView.scrollEnabled = YES;
    

    This might stop the scroll by disabling it, then allow it again. I haven't tried this specifically, but I've done similar things.

提交回复
热议问题