Instance Method

editingRectForBounds:

Returns the rectangle in which editable text can be displayed.

Declaration

- (CGRect)editingRectForBounds:(CGRect)bounds;

Parameters

bounds

The bounding rectangle of the receiver.

Return Value

The computed editing rectangle for the text.

Discussion

You should not call this method directly. If you want to provide a different editing rectangle for the text, you can override this method and return that rectangle. By default, this method returns a region in the text field that is not occupied by any overlay views.

See Also

Drawing and Positioning Overrides

- textRectForBounds:

Returns the drawing rectangle for the text field’s text.

- drawTextInRect:

Draws the receiver’s text in the specified rectangle.

- placeholderRectForBounds:

Returns the drawing rectangle for the text field’s placeholder text

- drawPlaceholderInRect:

Draws the receiver’s placeholder text in the specified rectangle.

- borderRectForBounds:

Returns the receiver’s border rectangle.

- clearButtonRectForBounds:

Returns the drawing rectangle for the built-in clear button.

- leftViewRectForBounds:

Returns the drawing rectangle of the receiver’s left overlay view.

- rightViewRectForBounds:

Returns the drawing location of the receiver’s right overlay view.