我試圖將行添加到我的tableView這樣的:ReloadData
[myArray addObject:@"Apple"];
[myTableView beginUpdates];
[myTableView insertRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:0 inSection:0]] withRowAnimation:UITableViewRowAnimationTop];
[myTableView endUpdates];
的問題是,這些細胞沒有得到刷新。 textLabels不對應於數據源數組。
我加入解決這個問題:
[myTableView reloadData];
但是最讓漂亮的插入動畫消失。
想法?謝謝!
作爲@ stephen-darlington表示,當你** addObject:**。它增加了可變數組 – 2013-02-26 08:51:10