UITableView的补充细胞动画
任何一个可以帮助我的UITableView
动画的问题。
Can any one help me out with UITableView
animating issue.
在默认情况下,我们有删除单元格,并在的UITableView
重新排序细胞动画。
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.
我已签出的 Three20 ,没没有得到如何叽叽喳喳
做了桌下的我的资料>锐推展开动画
I have checked out Three20, did not not get how twitter
has done the table expand animation under MyProfile>ReTweets.
要使用现有的动画的UITableView
来尝试没有 Three20 frameowrk,
。
Want to try it without Three20 frameowrk,
using the existing animation in UITableView
.
在这个家伙的任何帮助。
Any help on this guys.
由于提前,
您可以使用下面的方法的UITableView:
You can use the following UITableView method:
- (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation
与self.dataSource是一个可变的数组,你的表只含有1部分示例:
Example with self.dataSource being a mutable array and your table only having 1 section:
[self.dataSource addObject:@"New Item"];
NSIndexPath *newIndexPath = [NSIndexPath indexPathForRow:[self.dataSource count]-1 inSection:0];
[tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] withRowAnimation:UITableViewRowAnimationFade];
请注意:从数据源计数中减去1,因为NSIndexPath为零索引
Note: Subtracted 1 from datasource count since NSIndexPath is zero indexed.