我有一个从数组和下拉列表填充的 UITableView
。
如果我选择任何一行下拉列表,数组将被插入新值,tableview 应该被重新加载。
如何使用新的数组内容动画表视图?
动画像我想显示一行一个。我尝试了这个方法
- (void)reloadRowsAtIndexPaths:(NSArray )indexPaths withRowAnimation:(UITableViewRowAnimation)animation {
NSIndexPath rowToReload = [NSIndexPath indexPathForRow:[names count] inSection:0];
NSArray* rowsToReload = [NSArray arrayWithObjects:rowToReload, nil];
[tableDetails reloadRowsAtIndexPaths:rowsToReload withRowAnimation:UITableViewRowAnimationNone];
}