mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 12:15:37 +08:00
Introduction of RCTRootViewDelegate
Reviewed By: adamjernst Differential Revision: D2532327 fb-gh-sync-id: 0d018a6c2842f8021718fb7387ee6acb5d894645
This commit is contained in:
committed by
facebook-github-bot-7
parent
46803f0617
commit
576f5d79af
@@ -11,12 +11,14 @@
|
||||
|
||||
#import "RCTBridge.h"
|
||||
|
||||
@protocol RCTRootViewDelegate;
|
||||
|
||||
/**
|
||||
* This enum is used to define size flexibility type of the root view.
|
||||
* If a dimension is flexible, the view will recalculate that dimension
|
||||
* so the content fits. Recalculations are performed when the root's frame,
|
||||
* size flexibility mode or content size changes. After a recalculation,
|
||||
* TODO:<DelegateName> will be called with the new size passed as an argument.
|
||||
* rootViewDidChangeIntrinsicSize method of the RCTRootViewDelegate will be called.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, RCTRootViewSizeFlexibility) {
|
||||
RCTRootViewSizeFlexibilityNone = 0,
|
||||
@@ -90,6 +92,17 @@ extern NSString *const RCTContentDidAppearNotification;
|
||||
*/
|
||||
@property (nonatomic, assign) RCTRootViewSizeFlexibility sizeFlexibility;
|
||||
|
||||
/**
|
||||
* The size of the root view's content. This is set right before the
|
||||
* rootViewDidChangeIntrinsicSize method of RCTRootViewDelegate is called.
|
||||
*/
|
||||
@property (readonly, nonatomic, assign) CGSize intrinsicSize;
|
||||
|
||||
/**
|
||||
* The delegate that handles intrinsic size updates.
|
||||
*/
|
||||
@property (nonatomic, weak) id<RCTRootViewDelegate> delegate;
|
||||
|
||||
/**
|
||||
* The backing view controller of the root view.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user