Created
May 31, 2013 13:36
-
-
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?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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