开发者

table view crashes with 'NSRangeException'

I have a table view with a search bar at the top of the page. When I scroll through the table and then press in the search bar, while the table is still scroll开发者_运维知识库ing I get a

* Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSCFArray objectAtIndex:]: index (37) beyond bounds (0)'

I'm a little lost on what the issue here is. I'm thinking that the delegate methods for the table view don't get completely executed before it calls the search bar delegate methods.

Any help would be greatly appreciated.

Thank you.


Are you using threads?

Both the search bar and the table view delegate methods should be on the main thread and, thus, there is no way for one to interrupt the other.

However, events can be handled during scroll. If your search is clearing the table view during scroll, that may be an issue.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜