简体   繁体   English

XCode 12 SwiftUI 找不到自动预览

[英]XCode 12 SwiftUI cannot find Automatic Preview

I am working on an app in SwiftUI in XCode 12.2.我正在开发 XCode 12.2 中 SwiftUI 中的应用程序。

I have accidentally deleted the Automatic Preview Tab.我不小心删除了自动预览选项卡。 I cannot seem to find the option to bring it back.我似乎找不到将它带回来的选项。 Here is a screenshot of my XCode: My XCode without the automatic preview这是我的 XCode 的屏幕截图:我的 XCode 没有自动预览

Where do I enable the Automatic preview and bring it back so I can see real-time updates of my UI?我在哪里启用自动预览并将其恢复,以便我可以看到我的 UI 的实时更新?

An easy way to find it is from the menu "Editor > Canvas"一个简单的方法是从菜单“编辑器 > 画布”中找到它

In your Xcode snapshot, there is a button the top right corner with a bunch of horizontal lines.在您的 Xcode 快照中,右上角有一个带有一堆水平线的按钮。 Click it and then click Canvas and the preview should come back.单击它,然后单击 Canvas,预览应该会返回。 FYI, the preview canvas is different than a Storyboard, which is what you included in the "What I want" image.仅供参考,预览 canvas 与 Storyboard 不同,这是您在“我想要的”图像中包含的内容。

暂无
暂无

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

相关问题 有什么方法可以找出预览在 Xcode 上崩溃的原因 - SwiftUI - Is there any way to find out why Preview Crashed on Xcode - SwiftUI SwiftUI 预览卡在“自动预览更新已暂停”上 - SwiftUI preview stuck on "automatic preview updating paused" Xcode 12 Beta - 找不到模拟器运行时 - Xcode 12 Beta - Cannot find simulator runtime Xcode 12 - SwiftUI 预览不适用于 Swift Package 当有另一个 Swift Package 作为依赖项时 - 'previewInstances' 消息给代理 - Xcode 12 - SwiftUI preview doesn't work on Swift Package when have another Swift Package as dependencies - 'previewInstances' message to agent “无法在此文件中预览 - 连接中断:向代理发送 previewInstances 消息”Xcode 12 中的错误 - “Cannot preview in this file - Connection interrupted: send previewInstances message to agent" error in Xcode 12 无法预览此文件 - [App name] 可能已崩溃 SWIFTUI XCODE11 - Cannot preview this file - [App name] may have crashed SWIFTUI XCODE11 无法在此文件中预览 - 活动方案不会构建此文件:CatalinaOS 中的 Xcode 11 上的 SwiftUI - Cannot preview in this file - active scheme does not build this file : SwiftUI on Xcode 11 in CatalinaOS Xcode SwiftUI 如何滚动预览画布? - Xcode SwiftUI how to scroll the Preview Canvas? xcode 无法预览新的 SwiftUI 项目 - xcode can't preview new SwiftUI project 如何解决 SwiftUI 中的预览错误? [X代码 13] - How to solve preview bug in SwiftUI? [XCode 13]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM