我必须打印NSMutableArray *lstAirports;
排序按字母顺序排列和显示数组值
我对象的数组它打印所有记录在表格视图单元格
我要排序的字母顺序我的单元格的值。
如何做到这一点请一些帮助,没有给我按字母顺序排列
显示此代码,这是我的控制器类的代码
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// Return the number of rows in the section.
return app.lstAirports.count;
}
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease];
}
airport *a=(airport*)[app.lstAirports objectAtIndex:indexPath.row];
NSLog(@"str:%@",a);
cell.textLabel.text =a.Name;
cell.detailTextLabel.text=a.Code;
// Configure the cell...
return cell;
}
邮编您的阵列'airport'类 – Nekto