In one of my views, when a button is clicked, I call another view, which is a SplitViewController . If this SplitViewController is called through one of these buttons, I have special objects to add to the view. basically just navigation bar items like a cancel button. This idea can be obtained elsewhere, and these elements are not needed, so there is a special condition.
However, when the user is finished, and I pulled the ViewController back to the previous screen that was selected, the navigation bar disappears on this screen. I donβt tie it to the hidden one and I donβt do anything with the navigation bar. Just add a SplitViewController and then drop it back.
Some codes.
//declare the split screen VC SplitScreenViewController *split = [[SplitScreenViewController alloc] init]; //set the flag that this VC is coming from a button, so we need the extra nav bar items [split setIsFromButton:YES]; [self.navigationController pushViewController:split animated:YES];
now the callback is just ...
- (void)cancelSelectionBtnClicked { [self.navigationController popViewControllerAnimated:YES]; }
and when the view returns, the navigation bar has disappeared.
any ideas?
edit it should be noted that this is the same done elsewhere in the same way (as far as I can tell), and the navigation bar is displayed upon return.
source share