- [UIViewControllerWrapperView frame]: message sent to an exempted instance that received Crash in IOS7

My project was created for IOS5 and 6. After launching IOS7, we also update our project for IOS7. But I ran into one problem in iOS7.

When I install my application for the first time in the iOS7 simulator, it receives a failure with the following message.

*** -[UIViewControllerWrapperView frame]: message sent to deallocate 

But below iOS7, it works fine. Thanks

+4
source share
2 answers

Apple has changed the class hierarchy. Thus, the UiSearchbar approaches in iOS6 and iOS7 are different. Below iOS7, the UiTextField is a subview of the UiSearchBar directly, but in iOS7, the UISearchBar subview is a UIView, and then the UITextField is a subspecies of the UIView.

So, the same code did not work and did not work in iOS7.

0
source

OS 7 has changed some of the rules regarding table views and their delegate. Of course, this is not highlighted somewhere easy to find.

But basically, in an earlier version of iOS, you could disable the tableView delegate and datasource. No error messages were made.

From iOS 7, you MUST use them in your dealloc, otherwise it may cause this to crash.

 - (void)dealloc { fetchedResultsController.delegate = nil; self.searchDisplayController.delegate = nil; self.searchDisplayController.searchResultsDelegate = nil; self.searchDisplayController.searchResultsDataSource = nil; self.tableView.delegate = nil; self.tableView.dataSource = nil; } 

Let me know if this solves your problem.

+1
source

Source: https://habr.com/ru/post/1495464/


All Articles