Contents

userData

The data associated with a mouse-tracking event.

Declaration

var userData: UnsafeMutableRawPointer? { get }

Discussion

When you call addTrackingRect(_:owner:userData:assumeInside:) to set up a tracking rectangle, you can provide custom data to store in the event. AppKit makes that custom data available to you from this property.

This property is only valid when the event is of type NSMouseEntered or NSMouseExited. If you access this property for any other type of event, AppKit raises internalInconsistencyException.

See Also

Related Documentation

Getting tracking area information