Returns the appropriate rectangle to use when magnifying around the specified point.
- macOS 10.8+
The location in your view’s coordinate system around which magnification is centered.
The visible portion of the view. Use this value to help determine the specific content group you want to target for magnification.
The rectangle to use for magnification, specified in the view’s coordinate system. To get the default magnification behavior, return
AppKit calls this method when magnifying content in a scroll view. If you do not override this method, or if you return
NSZero, the scroll view magnifies the view’s content around the specified point. If you override this method and return a custom rectangle, the scroll view adjusts the magnification behavior to accommodate the rectangle you provide.
Use this method to provide AppKit with rectangles for your view’s custom content. If your view’s content can be divided into logical groups of content, use the provided
visible parameters to determine which group is being targeted and then return the rectangle that fully encloses that group. For example, a view with multiple columns of content could return the rectangle for the targeted column. The returned rectangle should always fully enclose the content, regardless of whether that rectangle is larger than the visible rectangle.