Suppose there is a UITableView
called myTable. Let them say that the following sequence of events occurs -
The table is full.
The data source has been updated (in this case sqlite3 db, but it doesn’t really matter), NSNotifcation means there is new data, the main stream receives a notification, and then calls [myTable reloadData].
myTable UITableViewDataSource numberOfSectionsInTableView
is called. Suppose only 1 section.
myTable UITableViewDataSource tableView:numberOfRowsInSection:
called.
Multiple tableView:cellForRowAtIndexPath:
receive a call based on the number of rows in the data source.
My question is related to interruption cellForRowAtIndexPath.
Question -
If "reloadData" is called and cellForRowAtIndexPath is called. Another reboot is in progress. Will cellForRowAtIndexPath stop in the middle and restart after calls to numberOfSectionsInTableView and numberofRowsInSection?
Or will there be a new reload of the Date queued, so that all the cellForRowAtIndexPaths properties will end before both the OffsectionsInTableView and numberOfRowsInSection are called?
I looked and could not find the answer to this question in the documents or on the network. I am concerned that if the data store is being updated and cellForRowAtIndexPaths is “running”, the numerical value of OfSectionsInTableView may change, which could cause cellForRowAtIndexPath to request data for a cell that is now out of range.
Any help would be greatly appreciated.
source share