Je remplis un UITableView avec NSDictionary et dictionaryWithContentsOfFile plist.Vue de table iPhone, en utilisant NSDictionary & plist
Dans le plist j'ai 3 rangées, chaque rangée a un tableau.
Je ne sais pas quel sera l'ID/index de la ligne.
Under:
// 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:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
// Configure the cell.
cell.textLabel.text = @"Blah";
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cell;
}
Pour cell.textLabel.text, comment dois-je faire quelque chose comme [self.myList getKey]; où getKey va retourner la clé/id de la ligne?