简体   繁体   English

iOS在视图中添加工具栏-不显示

[英]iOS Adding toolbar to View — Doesn't show up

I am attempting to add a toolbar to one of my views below the UIWebView. 我试图在UIWebView下面的一个视图中添加工具栏。 The View loads, but the toolbar doesn't. 视图会加载,但工具栏不会加载。

It is NOT in a navigation controller, it is its own view that is navigated to using a modal cross dissolve segue. 它不在导航控制器中,而是使用模态交叉溶解序列导航到它自己的视图。 Below is how I setup the view. 下面是我如何设置视图。

iOS工具栏

Make sure the autolayout constraints are correctly set. 确保正确设置自动布局约束。

On the provided screenshot I don't see any constraints in the inspector. 在提供的屏幕截图中,我没有在检查器中看到任何约束。 Select your toolbar, then reset its constraints to suggested ones. 选择您的工具栏,然后将其约束重置为建议的约束。

Here is how to do it: 这是操作方法:

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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