Question

How to change place navigationBack button with another button?

I wrote something like:

self.navigationItem.leftItemsSupplementBackButton = YES;

NSArray *arr = [NSArray arrayWithObjects: editButton, self.navigationItem.backBarButtonItem , nil]; 
self.navigationItem.leftBarButtonItems = arr;

and I want to navigationButton after editButton.

Was it helpful?

Solution

You should have edit button on the right and on on the left it will be default back button

for edit button on the right write this code in view did load

self.navigationItem.rightBarButtonItem=[[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStylePlain target:self action:@selector(edit)];

Then you should take one view with both these buttons on it and add this view on navigation bar

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top