I have been experiencing strange behavior with the header drawing the first time. Here are the steps I go through and it is reproducible every time.
- Go to Tab 2. Select an item to download.
- Download completes and imports data into CoreData database, which is linked to the TableView on Tab 1 (shown).
- I do make the following calls on the TableView:
}
-(void)controllerWillChangeContent:(NSFetchedResultsController*)controller {
[self.setsTableView beginUpdates];
}
-(void)controllerDidChangeContent:(NSFetchedResultsController*)controller {
[self.setsTableView endUpdates];
}
- Go to Tab 1 and the header for the 1st section i开发者_Python百科s displayed incorrectly.
As soon as I move the TableView scroll up or down, the problem immediately resolves itself. Also, if I quit the app and go back in, the header is displayed correctly.
I have drawn a red box around the problem area.
Anyone ever see this behavior before?
Notice the difference in how the header is displayed below. This is how it SHOULD look from the start. All I do between screenshot 1 (above) and screenshot 2 (below) is scroll the UITableView.
With the latest build of iOS, this problem seems to have gone away. I never did find a solution to it.
Did you remember to reload the table when the new data is available using this method. this is running on main thread, UI are only run on main thread
dispatch_async(dispatch_get_main_queue(), ^{
[self.tableview reloadData];
});
it's update..............
精彩评论