简体   繁体   中英

Can't add bar button item to navigationBar in detail viewController using Storyboard?

I am adding an item to navigationBar in Main viewController, it works well. When I am adding an item to navigationBar in detail ViewController, I drag the item to ViewController, but it doesn't work, I can only add it to the top or bottom of the ViewController. And when I run the app, there is no item in the screen.

在此处输入图片说明

How can I add an item to navigationBar in detail ViewController by storyboard?

您需要为DetailsViewController添加NavigationItem,然后选择Bar Button Item,并将其拖动到刚添加的NavigationItem中。

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