Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Hover effect in Custom UIKit Views

I am adapting my custom UI Framework for visionOS, and I'm wondering if it is going to be possible to detect hover over different UI elements within my view. The UI Framework draws to a Metal layer in a UIView. I don't currently support uihovergesturerecognizer on the view but I guess this wouldn't help, since you don't get coordinates. I can imagine an unpleasant solution might be to add invisible UIControls for each of my custom controls that are drawn in my own framework.

So it seems uihovergesturerecognizer is good for getting mouse-overs when i use the mouse in visionOS, but not good for eye-based hover effects

Hover effect in Custom UIKit Views
 
 
Q