xmartlabs / XLPagerTabStrip

Android PagerTabStrip for iOS.
MIT License
6.97k stars 1.33k forks source link

UITableViewController is jumping after I insert new Cells. #786

Closed app-arianamini closed 4 years ago

app-arianamini commented 4 years ago

If my child controller is UITableViewController and I fetch new data from backend by (after showing the last cell) and insert the new content (cells) to the tableView (via performBatchUpdates), the contentView is jumping and lagging.

I have already tried to reload contentView contentSize and also used updateContent method after inserting new cells. And also tried to set contentView.contentSize.height.

Did someone use this Framework with UITableViewController which has dynamic cell count and also dynamic cell height based on constraints?

PS: I get this warning too:

[TableView] Warning once only: UITableView was told to layout its visible cells and other contents without being in the view hierarchy (the table view or one of its superviews has not been added to a window). This may cause bugs by forcing views inside the table view to load and perform layout without accurate information (e.g. table view bounds, trait collection, layout margins, safe area insets, etc), and will also cause unnecessary performance overhead due to extra layout passes. Make a symbolic breakpoint at UITableViewAlertForLayoutOutsideViewHierarchy to catch this in the debugger and see what caused this to occur, so you can avoid this action altogether if possible, or defer it until the table view has been added to a window.