-
Quick Tip: A UITableView won’t reload itself you know?
It might sound obvious, but you’d be surprised at just how many new iPhone developers think that calling [tableView reloadData]; will reload their table’s data alone. If you’ve done this, it’s okay! The best way to handle table reloading is to create a method that handles JUST reloading the table’s data, and at the end of this method, call the [tableView reloadData];
Something like this -
- (void) reload {
[dataArray clearAllObjects];
[dataArray addObject:@"Refresh once"];
[dataArray addObject:@"Refresh twice"];
[tableView reloadData];
}
It might sound obvious, but you’d be amazed at how many people have asked me for help when it comes to UITableView reloading.
-
raphaelcaixeta posted this