【发布时间】:2013-02-21 05:08:57
【问题描述】:
我想用来自我的NSMutableArray 的数据填充我的UITableView,但它出现了异常。
例外:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM isEqualToString:]: unrecognized selector sent to instance 0xa2ba880'
我的 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.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
cell.textLabel.text = [callDetailArray objectAtIndex:indexPath.row];
[cell setAccessoryType: UITableViewCellAccessoryDisclosureIndicator];
return cell;
}
这是数组:
Array: (
{
callId = 3;
callKeyword = CALL100;
callName = "Call to All";
callNumber = 5908;
}
)
我想要发生的是UITaleView 中的单元格将显示callId、callKeyword、callName 和callNumber 中的数据。
【问题讨论】:
-
@Nitin Gohel ha 为您指明了正确的方向。问题是您试图将字典放入期望字符串值的属性中。
标签: iphone ios uitableview nsmutablearray