使用自定义 uitableviewcell 滚动 tableview 的问题

Posted

技术标签:

【中文标题】使用自定义 uitableviewcell 滚动 tableview 的问题【英文标题】:Issue with scrolling tableview with customized tableviewcell 【发布时间】:2011-03-09 17:34:48 【问题描述】:

我的问题是我有一个复杂的结构(NSArrays 和NSDictionaries),当我尝试自定义表格视图单元格的外观时,我使用上面所说的复杂结构构建了一个NSArray .首先,当它显示UITableview(带有单元格)时没有问题,但是当我滚动(向下或向上)时,我的应用程序会出现类似的错误:

(这是我向下滚动的时候)

[8721:40b]  Terminating app due to uncaught exception 'NSRangeException', reason:  -[NSMutableArray objectAtIndex:]: index 2 beyond bounds [0 .. 0]

(这是我向下滚动的时候)

[9018:40b] -[__NSCFSet objectAtIndex:]: unrecognized selector sent to instance 0x4c59750

2011-03-01 17:51:23.447 CinePlanet[9018:40b]  Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: -[__NSCFSet objectAtIndex:]: unrecognized selector sent to instance 0x4c59750

我在构建NSArray 时非常小心,我不知道我是否遗漏了其他内容。

【问题讨论】:

【参考方案1】:

看来我的 NSArray 的构造有问题。我不想再重复了,因为这里讨论了同样的问题,

建议你看看下面的帖子。

Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSMutableArray objectAtIndex:]: index 1 beyond bounds [0 .. 0]'

【讨论】:

以上是关于使用自定义 uitableviewcell 滚动 tableview 的问题的主要内容,如果未能解决你的问题,请参考以下文章