【发布时间】:2011-03-17 08:04:49
【问题描述】:
当我尝试将数组内容放入表格视图时出现此错误:
2011-03-17 15:54:13.142 FullApp[6851:207] -[NSCFString objectAtIndex:]:无法识别的选择器发送到实例 0x5903860
2011-03-17 15:54:13.143 FullApp[6851:207] * 由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:'-[NSCFString objectAtIndex:]:发送了无法识别的选择器到实例 0x5903860'
这是我的代码:
- (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.
FullAppAppDelegate *fullapp = (FullAppAppDelegate *)[[UIApplication sharedApplication]delegate];
NSString *cellValue = [[fullapp.soapResults objectAtIndex:0] objectAtIndex:indexPath.row];
cell.textLabel.text = cellValue;
这是我的数组内容:
2011-03-17 16:00:29.976 FullApp[6898:207] (
"Everyday.com.my",
"Mydeals.com.my"
)
【问题讨论】:
标签: iphone uitableview nsmutablearray nsarray tableview