Created
August 9, 2011 10:10
-
-
Save pratikshabhisikar/1133705 to your computer and use it in GitHub Desktop.
Add new cell to table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get number of rows in your table. | |
NSUInteger existingRows = ...; | |
// Create the index path of new cell to be added. | |
NSIndexPath *newCellIndexPath = [NSIndexPath indexPathForRow:existingRows inSection:0]; | |
// Update the datasource model... | |
// Add the new cell to table. | |
[self.myTableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newCellIndexPath] withRowAnimation:UITableViewRowAnimationFade]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment