Closed zijiaZ closed 1 week ago
😂
Using WebImage
's own modifier inside Button
has known issue. Because there are some special handing in SwiftUI internal (Image
is the basic building block actually)
From v3.0.0, you can use the AsyncImage
like API, which you receive a WebImagePhase
and you can get a SwiftUI.Image
to do customization after downloaded, maybe that one helps.
WebImage(url: URL(string: "https://nokiatech.github.io/heif/content/images/ski_jump_1440x960.heic")) { image in
image.resizable()
image.buttonStyle(.borderless)
}
instead of:
WebImage(url: URL(string: "https://nokiatech.github.io/heif/content/images/ski_jump_1440x960.heic"))
.resizable()
.buttonStyle(.borderless)
Does this helps ? If so you can close this issue.
Based on the doc https://developer.apple.com/documentation/swiftui/primitivebuttonstyle/borderless, On tvOS, this borderless style has a default hover effect, WebImage does not have it, but AsyncImage does.