S S S S - 29 days ago 20
iOS Question

Change UINavigationBar back button title

In my application I want to use 'Back' text as back button title for every viewcontroller.
I have read so many posts on stackoverflow but got nothing.

I don't want to set leftbarbuttonitem.

Can anyone help me on this simple task.

Thanks,

Answer

Do this in the parent view controller not in the child

self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:nil action:nil];