2014年10月6日 星期一

tableView顯示多層cell的動畫

//有Cell出現的動畫
[tableView reloadSections:[NSIndexSet indexSetWithIndex:indexPath.section] withRowAnimation:UITableViewRowAnimationNone];

//沒有動畫
[tableView reloadData];

要用reloadSections達到這樣子的動畫效果,可以用一個NSArray來包多個NSMutableArray代表不同的Section內容(二元矩陣),降子在改動MutableArray之後,才不會因為reloadSections造成程式crash。

沒有留言:

張貼留言