我有一个数组和一个tableview从数组中获取数据。当我在iPhone上查看桌面视图时,它的ofc没有排序,并且按我写的方式列出。在tableview中排序数组
我想我的排序数组中的tableview,所以他们不会列出像这样:
- d
- 一个
- 摹
- ˚F
- 小号
,但是代之以这样列出:
- 一个
- 乙
- Ç
- d
- Ë
- 等...
我怎样才能做到这一点?
这里是我的数组:
stationList = [[NSMutableArray alloc] init];
[stationList addObject:@"A"];
[stationList addObject:@"B"];
[stationList addObject:@"C"];
如何加载阵列到我的tableview阵列? 加载数组:
NSString *cellValue = [stationList objectAtIndex:indexPath.row];
cell.textLabel.text = cellValue;
阅读API文档NSMutableArray - 有排序方法。或谷歌“排序nsmutablearray”。 – occulus 2011-03-27 02:16:43