I am facing this error, when i come back to my old View after visiting a new View (On click of Back Button on navigationBar)
First: On click of searchBar, i am visiting a new View which contains searchBar in place of UINavigationBar
(UINavigationBar
is hidden in new View)..
Here is code snippet, which navigates to new View after clicking searchBar...
- (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar
{
BTSViewController *Obj = [[BTSViewController alloc] initWithNibName:@"BTSViewController" bundle:nil];
[self.navigationController pushViewController:Obj animated:NO];
}
Second: on click of cancel button in searchBar i am going back to my previous View & in
viewWillDisappear
method i am doing setNavigationBarHidden:NO
Here is code snippet, which comes back to previous View after clicking Cancel button in UISearchBar...
- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar
{
[self.navigationController popViewControllerAnimated:NO];
}
I am navigated to my previous view but UINavigationBar
is hidden and shows Unbalanced call error...
in my Log.
Thanks in advance !!