after visionos2 update, i can hover over my Button 's and see the effect, but i can't actually tap them. why?
Asked on 08/29/2024
1 search
It seems like you are experiencing an issue with tapping buttons after the VisionOS 2 update, even though you can see the hover effects. This could be related to how the hover effects and interaction regions are set up in your app.
In VisionOS, hover effects are designed to provide visual feedback when users look at interactive elements, but it's important to ensure that these elements also have sufficient tap targets. According to the session Design great visionOS apps, interactive elements need to have at least 60 points of space to ensure they are easy to tap. If the hover effects are too small or not properly aligned with the tap targets, it might cause issues with tapping.
Additionally, in the session Create custom hover effects in visionOS, it is mentioned that hover effects are applied by the system and are designed to be responsive. However, if the effects are not properly coordinated with the active and inactive states of the button, it might lead to unexpected behavior.
To resolve this, you might want to check the size and alignment of your interactive elements and ensure that the hover effects are correctly set up to transition between active and inactive states. You can also explore using effect groups to ensure that all related effects activate together, as discussed in the same session.
If you need more detailed guidance, you can refer to the session Create custom hover effects in visionOS for more information on how to properly implement and troubleshoot hover effects.

What’s new in SwiftUI
Learn how you can use SwiftUI to build great apps for any Apple platform. Explore a fresh new look and feel for tabs and documents on iPadOS. Improve your window management with new windowing APIs, and gain more control over immersive spaces and volumes in your visionOS apps. We’ll also take you through other exciting refinements that help you make expressive charts, customize and layout text, and so much more.

Optimize for the spatial web
Discover how to make the most of visionOS capabilities on the web. Explore recent updates like improvements to selection highlighting, and the ability to present spatial photos and panorama images in fullscreen. Learn to take advantage of existing web standards for dictation and text-to-speech with WebSpeech, spatial soundscapes with WebAudio, and immersive experiences with WebXR.

Build a spatial drawing app with RealityKit
Harness the power of RealityKit through the process of building a spatial drawing app. As you create an eye-catching spatial experience that integrates RealityKit with ARKit and SwiftUI, you’ll explore how resources work in RealityKit and how to use features like low-level mesh and texture APIs to achieve fast updates of the users’ brush strokes.