Swiftgram/AsyncDisplayKit
Michael Schneider 28cfd60900 Fix Assertion on cell deallocation due visibility not being cleared
Further information:
- We mark every node as visible in the ASRangeController which NSIndexPath is returned from visibleNodeIndexPathsForRangeController:
- In visibleNodeIndexPathsForRangeController: we get the visible index path's via a call to UITableView's "indexPathsForVisibleRows" method.
- Unfortunately in this case we cannot use indexPathsForVisibleRows to get all the visible index paths as apparently in a grouped UITableView it would return index paths for cells that are just a bit over the edge of the visible area.
- But this edge cells will never get a call for -tableView:cellForRowAtIndexPath:, but we will mark them as visible in the range controller
- In tableView:cellForRowAtIndexPath: we call -configureContentView:forCellNode
- Because we never get a -configureContentView:forCellNode call for the edge cells, the _ASDisplayView of the nodes will never be added to the window and get a willMoveToWindow and didMoveToWindow call and it's never get's added to the window for now and so the node is NOT marked as "in the hirarchy"
- If the deallocation of the views are happening without the UITableView ever scrolled, the cells don't get a call to __exitHierarchy as they were never added to the window and stay in the interface state "visible" and an exception will be raised within the dealloc method of the ASDisplayNode
2016-04-26 10:37:06 -07:00
..
2016-04-22 19:54:40 -07:00
2016-04-19 09:02:07 +01:00
2016-03-15 21:56:51 -07:00
2016-03-03 15:00:29 -08:00
2016-04-19 16:13:30 -07:00
2016-04-22 09:28:23 +01:00
2016-04-21 09:26:40 +01:00
2016-03-15 21:56:51 -07:00
2016-03-15 21:56:51 -07:00
2016-03-25 11:54:56 -07:00
2016-03-15 21:56:51 -07:00
2016-04-19 13:43:41 -07:00