您的位置:首页 > 产品设计 > UI/UE

iOS-UITableView使用reloadSections刷新section问题

2014-12-22 11:57 344 查看
一般使用直接使用

#define Secons 5 行数

[famousTangTable reloadSections:[[NSIndexSet alloc] initWithIndex:Secons] withRowAnimation:UITableViewRowAnimationAutomatic];


刷新某一行时会使那一行的section消失掉,老外给的解决方法是

[CATransaction begin];
 [CATransaction setCompletionBlock:^{
      [famousTangTable reloadData];
 }];
 <span style="font-family: Arial, Helvetica, sans-serif;">[famousTangTable reloadSections:[[NSIndexSet alloc] initWithIndex:2] withRowAnimation:UITableViewRowAnimationAutomatic];</span>
 [CATransaction commit];


就可以解决消失问题
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: