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.
我正在使用XCode 12 beta 2并iOS 14 Simulator尝试从占位符视图更新小部件预览屏幕(即,当我们尝试添加新小部件时出现的屏幕)
XCode 12 beta 2
iOS 14 Simulator
struct PlaceholderView : View { var body: some View { Text("Preview Title") } }
有什么解决办法吗?
我相信你已经解决了这个问题,但是从那时起,占位符是从这些函数中设置的:
// Placeholder func placeholder(in context: Self.Context) -> Self.Entry // Widget Galery func getSnapshot(in context: Self.Context, completion: @escaping (Self.Entry) -> ())