Yeah, see my solution in the newest answer
Post
Replies
Boosts
Views
Activity
Yeah: add @ViewBuilder before func resolve this issue
Yeah, my solution:
var body: some View {
…. {
}
.adoptableWidgetBackground(color)
}
extension View {
func adoptableWidgetBackground(_ color: Color) -> some View {
if #available(iOS 17.0, *) {
containerBackground(for: .widget) {
color
}
} else {
background(color)
}
}
}
Thank you, this is very helpful
I think they must change some codes about Screen Wake parts, maybe it relates Touch ID because of iPad,I thought iOS and iPadOS were separated, apparently not all.