Question

I've two view controller A and B.

A contains a table view and when the user taps on a row, B is pushed.

B has a UIToolbar self.navigationController.toolbarHidden = NO; and the problem is when I pop from B to A: the toolbar remains even on A and I have no idea how to remove.

Was it helpful?

Solution

It's happening because you does not hide toolBar when you pop from B to A viewController. Use/write following code in B viewController

#pragma mark -
#pragma mark - viewWillDisappear Methods

- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];    
    self.navigationController.toolbarHidden = YES;
}

So, your toolBar hide whenever you pop from B to A viewController. You Also should try with another option, use same code on viewWillAppear method of A viewController.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top