OC

Knowledge OS
主帖 1 条回复

uitableview 插入新的section?并始终保持在顶部?

stoneman2011 stoneman2011 · 2013年11月29日 · 阅读 6 · 更新于 2013年11月29日 · 无人欣赏。

现在我想在一个uitableview 上插入一个新的section ,但要保持这个插入新的section 总是在顶部。我使用如下代码 [myTableView beginUpdates]; [myTableView insertSections:[NSIndexSet indexSetWithIndex:displaySec-1] withRowAnimation:UITableViewRowAnimationTop];

    [totalSectionArr insertObject:[tempdays objectAtIndex:displaySec] atIndex:displaySec-1];

    [myTableView endUpdates];
第一次插入 确实在顶部,第二次就跑到中间去了?求解阿?各位

回复

1 条
登录 或者 注册