Perform an Action When The Mouse Cursor Enters a View With .onContinuousHover
Daily Coding Tip 144
In a macOS app, it is possible to catch the event that occurs when the mouse cursor is inside the bounds of a view. Inside this closure there is an enum called HoverPhase
. This has the .active
case, which has the mouse location as a CGPoint associated type. Then it has an .ended
case with no associated type, so we are on…
Keep reading with a 7-day free trial
Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.