// Copyright 2004-present Facebook. All Rights Reserved. #import #import "RCTExport.h" #import "RCTInvalidating.h" @protocol RCTScrollableProtocol; @protocol RCTViewNodeProtocol; @class RCTRootView; @class RCTJavaScriptEventDispatcher; @class RCTShadowView; @class RCTAnimationRegistry; @interface RCTUIManager : NSObject - (instancetype)initWithShadowQueue:(dispatch_queue_t)shadowQueue viewManagers:(NSDictionary *)viewManagers; @property (nonatomic, strong) RCTJavaScriptEventDispatcher *eventDispatcher; @property (nonatomic, strong) RCTSparseArray *shadowViewRegistry; @property (nonatomic, strong) RCTSparseArray *viewRegistry; @property (nonatomic, strong) RCTAnimationRegistry *animationRegistry; @property (nonatomic, weak) id mainScrollView; /** * Allows native environment code to respond to "the main scroll view" events. * see `RCTUIManager`'s `setMainScrollViewTag`. */ @property (nonatomic, readwrite, weak) id nativeMainScrollDelegate; + (UIView *)closestReactAncestor:(UIView *)view; + (UIView *)closestReactAncestorThatRespondsToTouch:(UITouch *)touch; - (void)registerRootView:(RCTRootView *)rootView; + (UIView *)JSResponder; @end