简体   繁体   中英

iOS app randomly crashes when scrolling through a table view, not sure how to handle error thrown

All I have is a simple table view that downloads content from twitter using AFNetworking and then displays it in cells. I have paging enabled in my tableView , and sometimes when I scroll between my data on my iPad, my app just freezes and my Xcode screen changes to this:

在此处输入图片说明

I am new to Objective-C, but in Java when things like this happened, it wrote out a list of all the methods and line numbers in my code leading up to the crash. Is there any way to get it to do something like that? I don't understand anything about this, and the console is just blank.

Check this question out. It will show you how to determine what is causing the exception.

As with Java, you can also add a try block and their corresponding catch and finally blocks to handle the exception. See this question .

Its because you are using a dictionary in which the object and key at some point of cell is creating problem for you. Check your NSDictionary data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM