Skip to content

Instantly share code, notes, and snippets.

@Cheesebaron
Created May 31, 2013 13:36
Show Gist options
  • Save Cheesebaron/5685017 to your computer and use it in GitHub Desktop.
Save Cheesebaron/5685017 to your computer and use it in GitHub Desktop.
Super hacky hack for forcing showing the Back button in the NavigationBar on iOS. Why does it work?
public override void ViewWillAppear(bool animated)
{
base.ViewWillAppear(animated);
NavigationItem.SetHidesBackButton(true, false);
NavigationController.NavigationBar.SetNeedsDisplay();
}
public override void ViewDidAppear(bool animated)
{
NavigationItem.SetHidesBackButton(false, true);
}
public override void ViewWillDisappear(bool animated)
{
base.ViewWillDisappear(animated);
NavigationController.NavigationBarHidden = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment