问题描述
Xcode 11 beta 中的Preview Assets"资产目录有什么用?
What is the use of "Preview Assets" assets catalog in Xcode 11 beta?
我刚刚使用 SwiftUI 创建了新项目.我检查了 Xcode 11 beta 的发行说明,但没有关于这个资产目录的信息.
I have just created new project with SwiftUI.I have checked release notes of Xcode 11 beta but there is no information about this assets catalog.
有什么用?
推荐答案
现在,当您布局视图时,您可以在 Canvas(代码编辑器右侧的窗口)中预览它.显然,您的应用程序的某些图像和其他数据只能在运行时获取,例如从您的 API 中获取.所以所有的存根都可以放在 Preview Content 文件夹中,尤其是在 Preview Assets 中
Now, when you layout your views you can preview it in Canvas (the window from the right side of the code editor).Obviously, some images and other data for your app you can get only in runtime, from your API for example.So all stubs can be placed into Preview Content folder, in particular in Preview Assets
这篇关于“预览资产"有什么用?Xcode 11 beta 中的资产目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!