Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 swiftUI 编写一个新应用程序。每次我打开一个新文件时,画布都会打开。我希望默认视图为“仅编辑器”,并且可以随时手动打开画布。
有没有办法改变默认值?
Just uncheck Canvas as shown below and this state will persists and for new files and after Xcode restart. (Tested with Xcode 11.4)
Canvas
Caution: Without Canvas opened SwiftUI contextual menu items are not available in Editor. Just be aware.
是的,您可以通过 Xcode 选择“仅显示编辑器”,这将始终打开编辑器,检查屏幕截图
调整编辑器选项----仅显示编辑器
或选择任何 SwiftUI 文件,然后按 Command + Enter(回车键),这将选择仅显示编辑器选项。