I am developing an IOS
application. I am using navigation controller. If I push to next page then back button title not shown previous page title in IOS 7. Back button title always "Back" in IOS 7. I set all pages titles in viewWillAppear
, viewDidload
like below. But it is not working.
self.navigationItem.title=@"Previous Page Title";
self.title = @"Previous Page Title";
What can I set back button title with previous page title in IOS 7
Thanx
If the title is large, back button shows back only.Try with short titles,like
if you want Long title , go for custom back button.
If you want to force to always have the back button, but still let the system create it for you (will handle "Back" localization, abbreviate the button to a single "<" if the current title is really long, etc), then just use an absurdly long back button title:
Try this code:
Or you can set an image for button like this:
And @selector method:
In iOS 7 the back button length is constrained (I think to 11 chars). You can set a custom "back button title" like this, for example in
viewDidAppear
in the view controller with the long title (not the current view controller!):