I am trying to get all the cells in my UITableView to call the CellForRowAtIndexPath when I rotate the device. I call a [self.tableView reloadData] in the willRotateToInterfaceOrientation method. This gets called (i've NSLog-ed it). But when I rotate the device CellForRowAtIndexPath only gets called for new rows that need displaying. But I want to rearrange the UIImageViews in the visible cells as well. However these never get updated.
开发者_StackOverflow社区Can anyone help?
Cheers Nick
WOW GOT IT!!! Just cost me a day of trying stuff. But it is usually something simple like this:
self.tableView only works if the main view is a subclass of UITableViewController. In my case it is not, I dragged the tableView into the XIB.
I need to determine which subview to reload:
//The view might not be at index:0, in my case it is...
[[self.view.subviews objectAtIndex:0] reloadData];
精彩评论