0
我有一个UITableView按字母顺序显示植物列表。在应用程序中,用户可以更改语言。当语言改变时,方法:如何重新加载一个UItableView的行和部分
[self.tableview reloadData];
现在以一种新语言显示相同的植物。问题在于行和部分是完整的,并且仍然按前一种语言的字母顺序排序。我已经用google搜索了一下,并且读取了stackoverflow以查找解决方案。我来最接近的是:
[[self tableView]reloadData];
NSRange range = NSMakeRange(0, [self numberOfSectionsInTableView:self.tableView]);
NSIndexSet *sections = [NSIndexSet indexSetWithIndexesInRange:range];
[self.tableView reloadSections:sections withRowAnimation:UITableViewRowAnimationFade];
不过,我必须通过viewdDidLoad
运行的tableView改变字母排序。
在[[self tableview]reloadData];
之后强制进行新的字母排序的最佳方法是什么?