iOS滚动视图tableview,collectionviewtableview的那些事儿tableview和cell相关

表视图(uitableView) 只刷新 组或者 单元格 的方法

2016-08-19  本文已影响31人  深圳王思聪

//一个section刷新

NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:2];

[tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];

//一个cell刷新

NSIndexPath *indexPath=[NSIndexPath indexPathForRow:3 inSection:0];

[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];

上一篇 下一篇

猜你喜欢

热点阅读