On navigating to any view in an app which has navigation controller implemented, it shows a back button to go to the previous view. Is there a way I can use custom image instead of the default one?
相关问题
- Views base64 encoded blob in HTML with PHP
- How to get the background from multiple images by
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Use savefig in Python with string and iterative in
- Unable to process app at this time due to a genera
- Where does this quality loss on Images come from?
- Specifying image dimensions in HTML vs CSS for pag
- How to insert pictures into each individual bar in
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
It almost works like a back button. With the exception of the transition animation (after the button is tapped and current view is popped off the navigation to the right).
The right way is to make a category.
I found that none of the solutions actually solved the BACK UIBarButton and also provided its hidden behavior if the view controller is root.
Yes you can.
You can control how the standard back button will look when another view controller is pushed on top of a given view controller by setting its navigation item's back bar button item (you can customize the title or use an image):
Note: you configure this in a "parent" view controller that may have other view controller(s) pushed on top of it. The configuration is done in the "parent" and the appearance of the back button is changed when some view controller is on top. Tapping the back button brings you back as expected.
You can also create your own UIBarButtonItem and set it as the leftButtonItem on the navigation bar on the current view controller:
Note: in this case, the back / left bar button item is changed for the current view controller (when it is on top). You must implement the
yourMethod:
method. If you simply want the button to go back, you have to handle popping the view controller yourself by calling[self.navigationController popViewControllerAnimated:YES];
.