UITextSelectionRect Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/UIKit.framework |
| Availability | Available in iOS 6.0 and later. |
| Declared in | UITextInput.h |
Overview
The UITextSelectionRect class encapsulates information about a selected range of text in a document. This class is an abstract class and must be subclassed to be used. The system text input views provide their own concrete implementations of this class.
Subclassing Notes
If you are implementing a custom text input view, you can subclass and use your custom class to return selection-related information. When subclassing, you should override and reimplement all properties. In your custom implementations, do not call super.
Tasks
Accessing the Selection Rectangle
-
rectproperty
Accessing Text-Related Attributes
-
rangeproperty -
writingDirectionproperty -
isVerticalproperty
Determining the Selection Status
-
containsStartproperty -
containsEndproperty
Properties
containsEnd
A Boolean value indicating whether the rectangle contains the end of the selection. (read-only)
Discussion
The value of this property is used to determine the placement of the selection handles in bidirectional text. It provides a clue to the system about whether the end of the selection is in the specified rectangle.
Availability
- Available in iOS 6.0 and later.
Declared In
UITextInput.hcontainsStart
A Boolean value indicating whether the rectangle contains the start of the selection. (read-only)
Discussion
The value of this property is used to determine the placement of the selection handles in bidirectional text. It provides a clue to the system about whether the start of the selection is in the specified rectangle.
Availability
- Available in iOS 6.0 and later.
Declared In
UITextInput.hisVertical
A Boolean value indicating whether the text is oriented vertically. (read-only)
Availability
- Available in iOS 6.0 and later.
Declared In
UITextInput.hrange
The range of text. (read-only)
Discussion
The range values are relative to the text in the text input view that created the receiver.
rect
The rectangle that encloses the receiver’s text range. (read-only)
Discussion
The returned rectangle is in the coordinate system of the text input view that created the receiver.
Availability
- Available in iOS 6.0 and later.
Declared In
UITextInput.hwritingDirection
The writing direction of text in the receiver’s text range. (read-only)
Availability
- Available in iOS 6.0 and later.
Declared In
UITextInput.h© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)