mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-17 07:39:17 +08:00
Summary: This adds a callback for <Text> to get metrics about the rendered text. It's divided by line but that could be changed to "fragments" (which makes more sense for multi-lingual). Right now by line is convenient as you frequently want to know where the first and last line end (though we could make this work with fragments I suppose). Reviewed By: shergin Differential Revision: D9440914 fbshipit-source-id: bb011bb7a52438380d3f604ffe7019b98c18d978
25 lines
533 B
Objective-C
25 lines
533 B
Objective-C
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <React/RCTComponent.h>
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface RCTTextView : UIView
|
|
|
|
@property (nonatomic, assign) BOOL selectable;
|
|
|
|
- (void)setTextStorage:(NSTextStorage *)textStorage
|
|
contentFrame:(CGRect)contentFrame
|
|
descendantViews:(NSArray<UIView *> *)descendantViews;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|