如何将[array objectAtIndex:indexPath.Row]作为字符串

时间:2014-03-03 07:04:43

标签: ios objective-c

NSString *dateString=[[NSString alloc]initWithFormat:@"%@",[timeit objectAtIndex:indexPath.row]];

2 个答案:

答案 0 :(得分:0)

试试这个:NSString *dateString=[array objectAtIndex:indexPath.row];

有效吗?

答案 1 :(得分:-4)

无需分配和初始化

NSString *dateString=[NSString StringWithFormat:@"%@", [timeit objectAtIndex:indexPath.row]];