RCTSurfaceHostingProxyRootView.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. - (instancetype)initWithSurface:(RCTSurface *)surface
  39. sizeMeasureMode:(RCTSurfaceSizeMeasureMode)sizeMeasureMode NS_UNAVAILABLE;
  40. - (void)cancelTouches;
  41. @end
  42. NS_ASSUME_NONNULL_END