mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
64a52532fe
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
29 lines
750 B
Objective-C
29 lines
750 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/RCTShadowView.h>
|
|
|
|
#import "RCTBaseTextShadowView.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface RCTTextShadowView : RCTBaseTextShadowView
|
|
|
|
- (instancetype)initWithBridge:(RCTBridge *)bridge;
|
|
|
|
@property (nonatomic, assign) NSInteger maximumNumberOfLines;
|
|
@property (nonatomic, assign) NSLineBreakMode lineBreakMode;
|
|
@property (nonatomic, assign) BOOL adjustsFontSizeToFit;
|
|
@property (nonatomic, assign) CGFloat minimumFontScale;
|
|
@property (nonatomic, copy) RCTDirectEventBlock onTextLayout;
|
|
|
|
- (void)uiManagerWillPerformMounting;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|