RCTTextSelection.h 615 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #import <React/RCTConvert.h>
  8. /**
  9. * Object containing information about a TextInput's selection.
  10. */
  11. @interface RCTTextSelection : NSObject
  12. @property (nonatomic, assign, readonly) NSInteger start;
  13. @property (nonatomic, assign, readonly) NSInteger end;
  14. - (instancetype)initWithStart:(NSInteger)start end:(NSInteger)end;
  15. @end
  16. @interface RCTConvert (RCTTextSelection)
  17. + (RCTTextSelection *)RCTTextSelection:(id)json;
  18. @end