I have a popover with a UITableViewController
as the content view controller. The table view has a UISearchBar
as its header view.
Everything is ok on iOS 6, but on iOS 7 the app crashes when closing the popover giving this error:
*** -[UIView release]: message sent to deallocated instance 0x118a9bf0
Any idea about the possible cause for this crash?
I ended up calling [searchBar removeFromSuperview]
in dealloc - same fix.
This is how I fixed it. I set the table's header view to nil
when the view controller is being deallocated:
- (void)dealloc {
self.tableView.tableHeaderView = nil;
}
Though, this doesn't explain the real reason for the crash.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With