- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *simpleTableIdentifier = @"MyCell2";
int size = [wordListV2 count];
NSLog(@"there are %d objects in the array", size);
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentifier];
}
// NSString *str [email protected]"%d", [wordListV2[i] ];
// cell.textLabel.text = str;
cell.textLabel.text = @"%d", [wordListV2 count];//[[wordListV2 objectAtIndex:indexPath.row] word];
NSLog(@"Helloo NS LOOOGG %d", [wordListV2 count]);
return cell;
}
问题是它为“HelloO NS LOOOGG 673”写入“NSLog部分”673次,但在单元格中我只能看到%d不是673.如果我能解决这个问题我会尝试“[[wordListV2 objectAtIndex:indexPath.row] word];而不是数字,但它不工作,当我试图把它放在单元格内。”此外我试图把它串第一又试图内,但仍然没有工作:(指定标签文本只显示格式字符串
玉家伙现在它的工作,我还有一个问题
欧凯现在的作品,但它仍然不是我真正想做的事情。什么可能是我得到的异常和断点停止在0x10e909b:movl 8(%edx),%edi 我可以收到我的数组的计数,但我不能达到它的内部对象这里是代码:
Words * word = [wordListV2 objectAtIndex:0];
NSLog(@"Helloo NS LOOOGG %@",word.word);
cell.textLabel.text = word.word;
当我试图到达NSMutable数组时,会发生异常。此外,我不知道是否与ot有任何关系,但它是否与gi ves也这
“; }; layer =>“, ”; };层=>” ) 2013年8月4日18:23:54.720
顺便说一句词是我的阶级和字的NSString *类型而在最后
stringWithformat not found return type is default to id !? – albatross
Doh,typo,应该是'stringWithFormat:'(大写'F')我会修复答案, – BergQuester
Okey现在可以工作,但它仍然是我真正想要做的。什么可能是我得到一个异常和断点停止在0x10e909b的问题:movl 8(%edx),%edi 我可以收到我的数组的计数,但我不能达到其中的对象这里是代码: Words * word = [wordListV2 objectAtIndex:0]; NSLog(@“Helloo NS LOOOGG%@”,word.word); – albatross