私はiPhone開発の初心者です。
私は配列の辞書を持っています。
{
A = (
{
address = "Talala (gir)";
"main_id" = 1;
mobile = 8878876884;
name = "Amit Patel";
},
{
address = "Junagdh";
"main_id" = 5;
mobile = 4894679865;
name = "Arjun Patel";
}
);
J = (
{
address = "Taveli";
"main_id" = 6;
mobile = 87886356085878;
name = "Jasmin Patel";
},
{
address = "Gujarat";
"main_id" = 4;
mobile = 6636633368;
name = "Jatin ";
}
);
R = (
{
address = "Mumbai";
"main_id" = 2;
mobile = 999686322;
name = "Rajan Patel";
}
);
S = (
{
address = "Rajkot";
"main_id" = 3;
mobile = 8866086549;
name = "Sumit Patel";
}
);
}
キーがオンになってUITableView
いる値を表示したい"name"
UITableViewCell
私のcellForRowAtIndexPath
方法は
- (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];
}
cell.textLabel.text = [[[self.finalPDic objectForKey:[self.listOfHeader objectAtIndex:indexPath.row]] objectAtIndex:indexPath.row] objectForKey:@"name"];
return cell;
}
しかし、上記のコードは私にとってはうまくいきません。