Search code examples
iosback-button

Back Button On UINavagationController Missing The Arrow?


I have a leftBarButtonItem and I am going to set it hidden in program, but I found the back button will be missing the arrow <

self.navigationItem.leftBarButtonItem.image = nil;

Solution

  • If you are not using the leftBarButtonItem, set it to nil:

    self.navigationItem.leftBarButtonItem = nil;
    

    Just setting the image to nil will not work as the UIBarButtonItem would still be present.