本文介绍了如何让我的 UIView 在 Xcode 的 Storyboard 编辑器中可见?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请查看显示 Xcode 中故事板一部分的屏幕截图.它是一个控制器.在与控制器相同的级别上,有两个 UIViews 日期选择器视图"和输入附件视图".在控制器本身中,它们显示在底部工具栏中(参见第二个屏幕截图 - 右侧的两个图标是视图的微小预览).但是我怎样才能编辑它们呢?我无法让它们出现在屏幕上!我知道它们在那里,但我想编辑它们(在我使它们成为控制器的并行元素之前曾经工作过)!我尝试右键单击、长按、缩放、平移、双击 - 没有.如果我将其中一个视图拖到控制器的视图中,我可以看到它们.控制器中也有出口,引用视图,视图可以从代码中使用就好了.但是编辑它们似乎变得不可能.

Please have a look at the screenshot that shows a part of a storyboard in Xcode. It is one controller. On the same level as the controller there are two UIViews "Date Picker View" and "Input Accessory View".In the controller itself, they are shown in the bottom toolbar (see 2nd screenshot - the two icons to the right are tiny previews of the the views).But how can I edit them? I cannot get them on the screen! I know they are there but I'd like to edit them (used to work before I made them parallel elements of the controller)! I tried right clicking, long clicking, zooming, panning, double clicking - nothing. If I drag one of the views into the controller's view, I can see them.There are also outlets in the controller, referencing the views and the view can be used from code just fine. But editing them seems to have become impossible.

推荐答案

您可以在检查器中选择它们并编辑它们的属性,但是除了将它们物理地移动到场景中并编辑它们之外,无法直观地编辑它们,然后将它们移回.

You can select them and edit their properties in the inspector, but there is no way to visually edit them short of physically moving them into one the scenes, editing them, and moving them back.

这篇关于如何让我的 UIView 在 Xcode 的 Storyboard 编辑器中可见?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 05:08