user717452
user717452

Reputation: 111

How can I have 2 leftBarButtonItems in iPhone app, and 1 be the default back button?

I would like 2 leftBarButtonItems, but leave one of the items as the default back button for Navigation Controllers. I have set up:

self.navigationItem.leftBarButtonItems = [NSArray arrayWithObjects:archives, ???, nil];

where archives is a UIBarButtonItem I created, but do not know what the default back button is to include in the array. Any suggestions?

Upvotes: 6

Views: 3300

Answers (1)

Sebastian Celis
Sebastian Celis

Reputation: 12195

Make sure you set leftItemsSupplementBackButton to YES.

self.navigationItem.leftItemsSupplementBackButton = YES;
self.navigationItem.leftBarButtonItems = [NSArray arrayWithObjects:archives, nil];

Upvotes: 19

Related Questions