简体   繁体   English

如何在Xcode Interface Builder中显示占位符背景?

[英]How do I show Placeholder Backgrounds in Xcode Interface Builder?

How do I set and show custom Placeholder Backgrounds in Xcode 7's Interface Builder? 如何在Xcode 7的Interface Builder中设置和显示自定义占位符背景?

This functionality was added in Xcode 7 , but I can't the way to set it. 此功能已添加到Xcode 7中 ,但是我无法设置它。

Background placeholders on custom views and other containers can be hidden on the Interface Builder canvas by selecting Editor > Canvas > Show Background Placeholders. 通过选择编辑器>画布>显示背景占位符,可以在Interface Builder画布上隐藏自定义视图和其他容器上的背景占位符。 (20580948) (20580948)

I've enabled in but nothing changed and I can't find where I can set a custom placeholder image: 我已启用,但没有任何更改,也找不到可以在其中设置自定义占位符图像的位置:

Xcode的“编辑器”菜单的“画布”子菜单已展开,并选中了“显示占位符背景”

A few years later and Xcode 10 still doesn't provide any of the flexibility you had in mind back then 😐 几年后,Xcode 10仍然无法提供您当时想到的任何灵活性😐

From Xcode 10 documentation: 从Xcode 10文档中:

Use placeholder backgrounds to identify image views, MapKit views, MetalKit views, GLKit views, and SceneKit views. 使用占位符背景识别图像视图,MapKit视图,MetalKit视图,GLKit视图和SceneKit视图。 Hide the placeholder backgrounds to focus on the content of your own views. 隐藏占位符背景以专注于您自己的视图的内容。

Choose Editor > Canvas > Show Placeholder Backgrounds to toggle showing placeholder backgrounds for certain types of views on the Interface Builder canvas. 选择“编辑器”>“画布”>“显示占位符背景”以切换“界面生成器”画布上某些类型的视图的显示占位背景。

The feature really is limited to only some of the built-in views from Apple (and even those that blue-ish background color is still pretty much hardcoded). 该功能真的仅限于一些内置苹果的意见(甚至是那些蓝色十岁上下的背景颜色仍然是相当多的硬编码)。

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

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