//更换出生日期
[[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];
本文介绍了一种在iOS应用中更新UITableView特定单元格的方法。通过使用NSIndexPath和reloadRowsAtIndexPaths方法,可以有效地刷新指定的cell或section,确保用户界面上的数据及时更新。此外,还提供了一个具体的代码示例,展示了如何通过生日选择器来更改并更新用户的出生日期。
6402

被折叠的 条评论
为什么被折叠?



