2015-02-20 04:10:52 +00:00
|
|
|
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
|
2015-03-01 23:33:55 +00:00
|
|
|
#import "RCTBridge.h"
|
2015-02-20 04:10:52 +00:00
|
|
|
#import "RCTBridgeModule.h"
|
|
|
|
#import "RCTInvalidating.h"
|
2015-03-01 23:33:55 +00:00
|
|
|
#import "RCTViewManager.h"
|
2015-02-20 04:10:52 +00:00
|
|
|
|
|
|
|
@class RCTRootView;
|
|
|
|
|
|
|
|
@protocol RCTScrollableProtocol;
|
|
|
|
|
2015-03-01 23:33:55 +00:00
|
|
|
/**
|
|
|
|
* The RCTUIManager is the module responsible for updating the view hierarchy.
|
|
|
|
*/
|
2015-02-20 04:10:52 +00:00
|
|
|
@interface RCTUIManager : NSObject <RCTBridgeModule, RCTInvalidating>
|
|
|
|
|
|
|
|
@property (nonatomic, weak) id<RCTScrollableProtocol> mainScrollView;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Allows native environment code to respond to "the main scroll view" events.
|
|
|
|
* see `RCTUIManager`'s `setMainScrollViewTag`.
|
|
|
|
*/
|
|
|
|
@property (nonatomic, readwrite, weak) id<UIScrollViewDelegate> nativeMainScrollDelegate;
|
|
|
|
|
2015-03-01 23:33:55 +00:00
|
|
|
/**
|
|
|
|
* Register a root view with the RCTUIManager. Theoretically, a single manager
|
|
|
|
* can support multiple root views, however this feature is not currently exposed
|
|
|
|
* and may eventually be removed.
|
|
|
|
*/
|
2015-02-20 04:10:52 +00:00
|
|
|
- (void)registerRootView:(RCTRootView *)rootView;
|
|
|
|
|
2015-03-01 23:33:55 +00:00
|
|
|
/**
|
|
|
|
* Schedule a block to be executed on the UI thread. Useful if you need to execute
|
|
|
|
* view logic after all currently queued view updates have completed.
|
|
|
|
*/
|
|
|
|
- (void)addUIBlock:(RCTViewManagerUIBlock)block;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The view that is currently first responder, according to the JS context.
|
|
|
|
*/
|
2015-02-20 04:10:52 +00:00
|
|
|
+ (UIView *)JSResponder;
|
|
|
|
|
|
|
|
@end
|
2015-03-01 23:33:55 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This category makes the current RCTUIManager instance available via the
|
|
|
|
* RCTBridge, which is useful for RCTBridgeModules or RCTViewManagers that
|
|
|
|
* need to access the RCTUIManager.
|
|
|
|
*/
|
|
|
|
@interface RCTBridge (RCTUIManager)
|
|
|
|
|
|
|
|
@property (nonatomic, readonly) RCTUIManager *uiManager;
|
|
|
|
|
|
|
|
@end
|