4
detailTextLabelは、ソースがそこにあると考えられるので、表示されません。それに応じてtextLable.textも表示されます。 listDicUITableViewCellを設定できませんdetailTextLabel.text
の- (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...
if ([[NSUserDefaults standardUserDefaults] objectForKey:@"favouriteListArray"] != nil) {
NSArray *listArray = [NSArray arrayWithArray:[[NSUserDefaults standardUserDefaults] objectForKey:@"favouriteListArray"]];
NSLog(@"listArray:%@", listArray);
NSDictionary *listDic = [listArray objectAtIndex:indexPath.row];
NSLog(@"listDic:%@", listDic);
cell.textLabel.text = [listDic objectForKey:@"Description"];
cell.detailTextLabel.text = [listDic objectForKey:@"Address"];
}
return cell;
}
NSLogs
listDic:{
Address = myAddress;
Description = myDescription;
}