Can any one help me out with UITableView
animating issue?
By default we have animation for deleting cell and reordering cells in UITableView
.
Can we have animated adding cell, if so how to do it.
I have checked out Three20, did not not get how twitter
has done the table expand animation under MyProfile>ReTweets.
Want to try it without Three20 frameowrk,
using the existing animation in UITableView
.
Use reloadRowsAtIndexPaths:indexPath
i hope this will help you..
You can use the following UITableView method:
Example with self.dataSource being a mutable array and your table only having 1 section:
Note: Subtracted 1 from datasource count since NSIndexPath is zero indexed.
Swift
Example array that is the data source for the table view
The following will add a row with animation at the top of the table view.
Multiple updates
If you need to do multiple insertions and/or deletions then surround them with
beginUpdates()
andendUpdates()
.Further reading