Je dois imprimer NSMutableArray *lstAirports;
tableau de tri par ordre alphabétique et l'affichage des valeurs de tableau dans la vue tableau
mon tableau d'objet, il imprime tous les enregistrements en vue tableau cellule
Je veux trier ma valeur cellulaire dans l'ordre alphabétique .
comment faire qui svp l'aide de ce code ne m'a pas livré affichage par ordre alphabétique
ceci est mon code de classe contrôleur
- (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;
}
Code postal de 'airport' classe – Nekto