简体   繁体   中英

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?

Make sure you set leftItemsSupplementBackButton to YES.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM