A gesture recognizer that looks for pointer movement over a view.
On macOS devices, a user can move the pointer over user interface elements. For some UI designs, it’s important to know when the pointer moves over an element, with no other user interactions, such as clicking the mouse button. The text for a hyperlink, for instance, may change colors or become underlined as the pointer moves over the link. This creates a rollover effect.
To provide this experience in your app, add a hover gesture recognizer that reacts as the pointer moves over the view. Provide the gesture recognizer with a target and action that the system calls when the pointer enters, exits, and moves across the view. The following code shows an example.
UIHoverGestureRecognizer has no effect when your app runs in iOS.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.