Post

Replies

Boosts

Views

Activity

iOS app running in compatibility mode on Apple Vision Pro does not apply hoverEffect to SwiftUI View
We tested our iOS app on visionOS and found that the hover effect works on most of UIKit views, but it does not work on most of SwiftUI views. SwiftUI views are used within UIHostingController. I created a new project (Storyboard based iOS app) and displayed the following SwiftUI view in UIHostingController and found that the buttons in the List were highlighted, but not the standalone buttons. struct SwiftUIView: View { var body: some View { List { // This button has the hover effect. Button { print("Hello") } label: { Text("Hello") } } // This button does't have the hover effect. Button { print("Hello") } label: { Text("Hello") } .hoverEffect() } } Is there a way to highlight any SwiftUI view?
2
1
917
Jun ’24