0
votes

I am building a RSS feed on a tableview. When i run the app, on my iPhone could run smoothly while in ipad, it crashed and showed "Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named UIRefreshControl'"

I tried to run the app on my ipad simulator, it also could run smoothly. May I know what is the problem for that?

Thanks

2
Your iPad is running iOS 6, right?Dave DeLong
first generation ipad. On 5.1.1,Clarence
Just found this related question and answer: stackoverflow.com/questions/13027250/… Not sure how to try it, since I am not intentionally calling UIRefreshControl, but it may provide help for others with the same question.Sid Wyckoff

2 Answers

5
votes

UIRefreshControl only exists on iOS 6. So if your iPad is running 5.1.1, you won't be able to use UIRefreshControl, because UIRefreshControl did not exist in iOS 5.1.1. So when the nib decoding happens, the decoder finds "UIRefreshControl", it doesn't know what to do with it, and it crashes.

5
votes

In your storyboard, click on the tableview and go to the Attribute Inspector. Under the section "TableView Controller" there is a selection window for "Refreshing" that can be set to disabled. When I built for my iPad-1, running iOS 5.1 I got an empty tableView instead of the error, 'Could not instantiate class named UIRefreshControl'. This was to be expected since I haven't populated the device with files to select, yet.