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.
Post
Replies
Boosts
Views
Activity
Thank you, this is very helpful
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)
}
}
}
Yeah: add @ViewBuilder before func resolve this issue
Yeah, see my solution in the newest answer