![](/img/trans.png)
[英]How to Add a Bar Button Item on a Disappeared Navigation Bar using Storyboard?
[英]Can't add bar button item to navigationBar in detail viewController using Storyboard?
我在Main viewController中的navigationBar中添加了一个项目,它运作良好。 当我向ViewBar的详细导航栏添加一个项目时,我将该项目拖到ViewController,但是它不起作用,我只能将其添加到ViewController的顶部或底部。 当我运行该应用程序时,屏幕上没有任何项目。
如何通过Storyboard在详细ViewController的NavigationBar中添加项目?
您需要为DetailsViewController添加NavigationItem,然后选择Bar Button Item,并将其拖动到刚添加的NavigationItem中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.