Sets the area in a view above or below which the editing menu is positioned.
- iOS 3.0–13.0Deprecated
- Mac Catalyst 13.0–13.0Deprecated
A rectangle that defines the area that is to be the target of the menu commands.
The view in which
This target rectangle (
target) is usually the bounding rectangle of a selection.
UIMenu positions the editing menu above this rectangle; if there is not enough space for the menu there, it positions it below the rectangle. The menu’s pointer is placed at the center of the top or bottom of the target rectangle as appropriate. Note that if you make the width or height of the target rectangle zero,
UIMenu treats the target area as a line or point for positioning (for example, an insertion caret or a single point).
Once it is set, the target rectangle does not track the view; if the view moves (such as would happen in a scroll view), you must update the target rectangle accordingly.