[英]bar button is not showing on the navigation bar at run time
I am following this tutorial , and as shown in image-1 below, I added the "Add" bar button, but when I run the simulator it does not show up as shown in image-2. 我正在按照本教程进行操作 ,并且如下面的图1所示,我添加了“添加”栏按钮,但是当我运行模拟器时,它没有如图2所示显示。
please let me know why the "Add" button is not showing and how to fix it. 请让我知道为什么“添加”按钮没有显示以及如何解决。
image-1 : 图片1 :
image-2 : 图片2 :
Two possible scenario : 两种可能的情况:
Scene 1 : 场景1:
Looks like you are using iPhone 6s Plus simulator and 100% zoomed. 看起来您正在使用iPhone 6s Plus模拟器,并且100%缩放。 So I could see horizontal and vertical scroll both.
所以我可以看到水平和垂直滚动。 I believe the Plus button is still there its just that u have to scroll to see it.
我相信加号按钮仍然存在,只是您必须滚动才能看到它。 Even the title Players is not in center :)
甚至标题玩家也不在中心:)
Use Command + 3 to zoom out the simulator and see the O/P without scroll :D 使用Command + 3缩小模拟器并查看O / P,无需滚动:D
Scene 2: 场景2:
If you have added Navigation bar manually make sure you add top, leading and trailing constraint to Navigation Bar. 如果您手动添加了导航栏,请确保将顶部,前导和尾随约束添加到导航栏。 The Nav bar you added is bigger than iPhone 6 plus size and because there is no auto layout constraint added it might have extended beyond the screen.
您添加的导航栏大于iPhone 6的尺寸,并且因为没有添加自动布局约束,它可能已扩展到屏幕之外。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.