I created a widget extension with Xcode 12. At that time everything was fine. But recently I update Xcode to 12.1, some elements of preview in canvas is missing. For example:
2. Text element with cornerRadius was missing.
View with same code is fine in main app canvas. How to fix that? Thank you for any help.
Text element that foregroundColor has alpha was missing, either using withAlphaComponent of UIColor or opacity
Code Block Swift struct TWidgetEntryView : View { var entry: Provider.Entry let alphaColor = UIColor.red.withAlphaComponent(0.8) var body: some View { Text("Some Text") .foregroundColor(Color(alphaColor)) } }
2. Text element with cornerRadius was missing.
Code Block Swift struct TWidgetEntryView : View { var entry: Provider.Entry var body: some View { Text("Some Text") .cornerRadius(3) } }
View with same code is fine in main app canvas. How to fix that? Thank you for any help.