Returns a Boolean value that indicates whether the point is in the specified rectangle.
- macOS 10.0+
- Mac Catalyst 13.0+
true if the hot spot of the cursor lies inside a given rectangle, otherwise
This method assumes an unscaled and unrotated coordinate system. Specify
flipped if the underlying view uses a flipped coordinate system.
Point-in-rectangle functions generally assume that the bottom edge of a rectangle is outside of the rectangle boundaries, while the upper edge is inside the boundaries. This method views
a from the point of view of the user—that is, this method always treats the bottom edge of the rectangle as the one closest to the bottom edge of the user’s screen. By making this adjustment, this function ensures consistent mouse-detection behavior from the user’s perspective.