Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work on tvOS borderless style #320

Closed
zijiaZ opened this issue Jun 12, 2024 · 3 comments
Closed

Does not work on tvOS borderless style #320

zijiaZ opened this issue Jun 12, 2024 · 3 comments
Labels

Comments

@zijiaZ
Copy link

zijiaZ commented Jun 12, 2024

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.

@dreampiggy
Copy link
Collaborator

dreampiggy commented Jun 17, 2024

😂

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.

@dreampiggy
Copy link
Collaborator

dreampiggy commented Jun 17, 2024

    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)

@dreampiggy
Copy link
Collaborator

Does this helps ? If so you can close this issue.

@zijiaZ zijiaZ closed this as completed Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants