2010-08-17 40 views
0

具有该COE米....可以任一项告诉我如何可以打印在UITable视图细胞如何打印存储在NSMutable数组值..到的UITableView细胞

[customerDetailsArray ADDOBJECT:[NSDictionary的dictionaryWithObjectsAndKeys :nameStr的,@ “名”,cityStr,@ “城市”,countryStr,@ “国”,无]]; NSLog(@“customerDetailsArray%@”,customerDetailsArray);

我通过这种方式尝试,但成功新台币

如果(indexPath.row == 0){ cell.textLabel.text = [的NSString stringWithFormat:@ “”,[customerDetailsArray objectAtIndex:indexPath。行] objectForKey:@“name”]]; }

谢谢You..Ifü喜欢我的问题ATLEAST接受......

回答

0

你正在一个空字符串每次推杆。它改成这样:

if(indexPath.row == 0) { 
    cell.textLabel.text = [NSString stringWithFormat:@"%@",[[customerDetailsArray objectAtIndex:indexPath.row] objectForKey:@"name"]]; 
} 

通知的%@

+0

感谢马特的快速回复,但üknow..even我曾试图that..but NULL值出现在UITable观察室....但是当我打印数组通过使用NSLog ...它打印正确....等待你的回应马特 – Talktobijju 2010-08-17 06:12:17

+0

你确实把'%@'放在'[NSString stringWithFormat:@“%@”'? 你可以通过数组看起来像什么吗? – 2010-08-17 06:49:04