I called
[self.navigationItem setRightBarButtonItems:nil animated:YES];
to hide the buttons during refresh operations
Sometimes I caught an exception saying
*** setObjectForKey: object cannot be nil (key: kUINavigationBarAnimationRightViews)
I called
[self.navigationItem setRightBarButtonItems:nil animated:YES];
to hide the buttons during refresh operations
Sometimes I caught an exception saying
*** setObjectForKey: object cannot be nil (key: kUINavigationBarAnimationRightViews)
Previously the rightBarButtonItems
array contained an item with a custom view - a UISearchBar
being a firstResponder
.
Calling the following line of code caused the crash
[self.navigationItem setRightBarButtonItems:nil animated:YES];
Simply calling
self.searchBar resignFirstResponder];
solved the issue