简体   繁体   中英

iphone - pushing view controller onto the stack hides bar button items in the nav bar

I have a nav bar with bar button items on the left and right of the title. When I push a new view controller onto the stack, the bar buttons on the left get replaced by a "back" button, and the bar buttons on the right disappear altogether. How can you override this behavior and keep the bar buttons from going away?

The bar buttons are connected to the view controller that is currently shown. So if you want those buttons to appear when another view controller is pushed then you will have to set them up in the same manner as you did for the first one.

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