iOS Developer Library — Pre-Release

Developer

UIKit Framework Reference UITextSelectionRect Class Reference

Options
Deployment Target:

On This Page
Language:

UITextSelectionRect

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. More...

Inheritance


Conforms To


Import Statement


Swift

import UIKit

Objective-C

@import UIKit;

Availability


Available in iOS 6.0 and later.
  • rect rect Property

    The rectangle that encloses the receiver’s text range. (read-only)

    Declaration

    Swift

    var rect: CGRect { get }

    Objective-C

    @property(nonatomic, readonly) CGRect rect

    Discussion

    The returned rectangle is in the coordinate system of the text input view that created the receiver.

    Import Statement

    Swift

    import UIKit

    Availability

    Available in iOS 6.0 and later.

  • The writing direction of text in the receiver’s text range. (read-only)

    Declaration

    Swift

    var writingDirection: UITextWritingDirection { get }

    Objective-C

    @property(nonatomic, readonly) UITextWritingDirection writingDirection

    Import Statement

    Swift

    import UIKit

    Availability

    Available in iOS 6.0 and later.

  • A Boolean value indicating whether the text is oriented vertically. (read-only)

    Declaration

    Swift

    var isVertical: Bool { get }

    Objective-C

    @property(nonatomic, readonly) BOOL isVertical

    Import Statement

    Swift

    import UIKit

    Availability

    Available in iOS 6.0 and later.

  • A Boolean value indicating whether the rectangle contains the start of the selection. (read-only)

    Declaration

    Swift

    var containsStart: Bool { get }

    Objective-C

    @property(nonatomic, readonly) BOOL containsStart

    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.

    Import Statement

    Swift

    import UIKit

    Availability

    Available in iOS 6.0 and later.

  • A Boolean value indicating whether the rectangle contains the end of the selection. (read-only)

    Declaration

    Swift

    var containsEnd: Bool { get }

    Objective-C

    @property(nonatomic, readonly) BOOL containsEnd

    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.

    Import Statement

    Swift

    import UIKit

    Availability

    Available in iOS 6.0 and later.