更新此主题,因为我有一些其他的帮助解决,为什么我不能够访问方法外NSDictionarys值...更新:不能通过的NSDictionary到的UITableViewCell为textLabel
我initalizing错从而自动释放了被称为在该方法的结尾,所以当我在该方法之外调用它时,我得到各种各样的错误..
所以现在基本上我试图分配NSDictionarys值到UITableViewCell文本里面cellForRowAtIndexPath但是我我得到这个错误
这里是我如何尝试在这一点上
// Configure the cell...
if(indexPath.row <= [self.sectionLetters count]){
// NSObject *key = [self.sectionLetters objectAtIndex:indexPath.row];
NSString *value = [self.arraysByLetter objectForKey:[self.sectionLetters objectAtIndex:indexPath.row]];
NSLog(@"thingy %@", value);
cell.textLabel.text = value;
}
return cell;
分配,并输出.OUTPUT
2011-09-23 10:25:01.343 Code[6796:207] thingy (
Honda,
Honda,
Honda,
Honda,
Honda,
Honda,
Honda
)
然而
,如果我注释掉//Cell.textLabel.text = value;
我得到这个输出
.output2
2011-09-23 10:26:38.322 Code[6876:207] thingy (
Honda,
Honda,
Honda,
Honda,
Honda,
Honda,
Honda
)
2011-09-23 10:26:38.323 Code[6876:207] thingy (
Mazda,
Mazda,
Mitsubishi,
Mitsubishi,
Mitsubishi,
Mitsubishi,
Mitsubishi,
Mitsubishi
)
2011-09-23 10:26:38.325 Code[6876:207] thingy (
Nissan,
Nissan,
Nissan,
Nissan,
Nissan,
Nissan,
Nissan
)
2011-09-23 10:26:38.326 Code[6876:207] thingy (
Toyota,
Toyota,
Toyota
)
你能发布你的界面(.h)文件吗? –
提供.h文件显示arraysByLetter的声明。谢谢:) –
我想这需要问...你绝对确定startSortingTheArray被称为BEFORE cellForRowAtIndexPath? –