RCTSurfaceHostingProxyRootView.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #import <UIKit/UIKit.h>
  8. #import <React/RCTRootView.h>
  9. #import "RCTSurfaceHostingView.h"
  10. NS_ASSUME_NONNULL_BEGIN
  11. /**
  12. * This is a RCTRootView-compatible implementation of RCTSurfaceHostingView.
  13. * Use this class to replace all usages of RCTRootView in the app for easier migration
  14. * to RCTSurfaceHostingView.
  15. *
  16. * WARNING: In the future, RCTRootView will be deprecated in favor of RCTSurfaceHostingView.
  17. */
  18. @interface RCTSurfaceHostingProxyRootView : RCTSurfaceHostingView
  19. #pragma mark RCTRootView compatibility - keep these sync'ed with RCTRootView.h
  20. @property (nonatomic, copy, readonly) NSString *moduleName;
  21. @property (nonatomic, strong, readonly) RCTBridge *bridge;
  22. @property (nonatomic, copy, readwrite) NSDictionary *appProperties;
  23. @property (nonatomic, assign) RCTRootViewSizeFlexibility sizeFlexibility;
  24. @property (nonatomic, weak) id<RCTRootViewDelegate> delegate;
  25. @property (nonatomic, weak) UIViewController *reactViewController;
  26. @property (nonatomic, strong, readonly) UIView *contentView;
  27. @property (nonatomic, strong) UIView *loadingView;
  28. @property (nonatomic, assign) BOOL passThroughTouches;
  29. @property (nonatomic, assign) NSTimeInterval loadingViewFadeDelay;
  30. @property (nonatomic, assign) NSTimeInterval loadingViewFadeDuration;
  31. - (instancetype)initWithBridge:(RCTBridge *)bridge
  32. moduleName:(NSString *)moduleName
  33. initialProperties:(NSDictionary *)initialProperties NS_DESIGNATED_INITIALIZER;
  34. - (instancetype)initWithBundleURL:(NSURL *)bundleURL
  35. moduleName:(NSString *)moduleName
  36. initialProperties:(NSDictionary *)initialProperties
  37. launchOptions:(NSDictionary *)launchOptions;
  38. - (void)cancelTouches;
  39. @end
  40. NS_ASSUME_NONNULL_END