iOS Developer Library

Developer

UIKit Framework Reference UITextRange Class Reference

Options
Deployment Target:

On This Page
Language:

UITextRange

A UITextRange object represents a range of characters in a text container; in other words, it identifies a starting index and an ending index in string backing a text-entry object. More...

Inheritance


Conforms To


Import Statement


import UIKit @import UIKit;

Availability


Available in iOS 3.2 and later.
  • start start Property

    The start of a range of text. (read-only)

    Declaration

    Swift

    var start: UITextPosition { get }

    Objective-C

    @property(nonatomic, readonly) UITextPosition *start

    Discussion

    Compute and store in this property the UITextPosition object representing the start of a range of text.

    Import Statement

    import UIKit

    Availability

    Available in iOS 3.2 and later.

  • end end Property

    The end of the range of text. (read-only)

    Declaration

    Swift

    var end: UITextPosition { get }

    Objective-C

    @property(nonatomic, readonly) UITextPosition *end

    Discussion

    Compute and store in this property the UITextPosition object representing the end of a range of text.

    Import Statement

    import UIKit

    Availability

    Available in iOS 3.2 and later.

  • empty empty Property

    A Boolean value that indicates whether the range of text represented by the receiver is zero-length. (read-only)

    Declaration

    Swift

    var empty: Bool { get }

    Objective-C

    @property(nonatomic, readonly, getter=isEmpty) BOOL empty

    Import Statement

    import UIKit

    Availability

    Available in iOS 3.2 and later.