iOS開發中tableView中的單獨刷新一行或者是某一個Section

//更換出生日期
[[CommonMediator shareMediator:self]presentToFPickViewPage:_birthday block:^(NSArray *retuanArray) {
_birthday = [retuanArray objectAtIndex:0];
_birthday = [NSDate datewithDot:_birthday];
NSIndexPath *te=[NSIndexPath indexPathForRow:3 inSection:0];
NSArray * array = @[te];
[_tableView reloadRowsAtIndexPaths:array withRowAnimation:UITableViewRowAnimationFade];
} pickStyle:FPickViewStyle_Birthday];

UITableview 刷新某一個cell 或 section
IOS筆記
//一個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];

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章