Files
react-native/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.h
T
Peter ArganyandFacebook GitHub Bot 7e300db703 Remove NS_UNAVAILABLE constraint from RCTSurfaceHostingProxyRootView initializer
Summary:
From the header of `RCTSurfaceHostingProxyRootView`:

     This is a RCTRootView-compatible implementation of RCTSurfaceHostingView.
     Use this class to replace all usages of RCTRootView in the app for easier migration

I need to do exactly this, but for a bridgeless mode callsite. This proxy class only uses the bridge for some perf logging, which we're fine with not having right now.

Reviewed By: shergin

Differential Revision: D21893522

fbshipit-source-id: 3547cff6143f44714e39e4104d03336010081e2e
2020-06-08 10:30:14 -07:00

53 lines
1.9 KiB
Objective-C

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <UIKit/UIKit.h>
#import <React/RCTRootView.h>
#import "RCTSurfaceHostingView.h"
NS_ASSUME_NONNULL_BEGIN
/**
* This is a RCTRootView-compatible implementation of RCTSurfaceHostingView.
* Use this class to replace all usages of RCTRootView in the app for easier migration
* to RCTSurfaceHostingView.
*
* WARNING: In the future, RCTRootView will be deprecated in favor of RCTSurfaceHostingView.
*/
@interface RCTSurfaceHostingProxyRootView : RCTSurfaceHostingView
#pragma mark RCTRootView compatibility - keep these sync'ed with RCTRootView.h
@property (nonatomic, copy, readonly) NSString *moduleName;
@property (nonatomic, strong, readonly) RCTBridge *bridge;
@property (nonatomic, copy, readwrite) NSDictionary *appProperties;
@property (nonatomic, assign) RCTRootViewSizeFlexibility sizeFlexibility;
@property (nonatomic, weak) id<RCTRootViewDelegate> delegate;
@property (nonatomic, weak) UIViewController *reactViewController;
@property (nonatomic, strong, readonly) UIView *contentView;
@property (nonatomic, strong) UIView *loadingView;
@property (nonatomic, assign) BOOL passThroughTouches;
@property (nonatomic, assign) NSTimeInterval loadingViewFadeDelay;
@property (nonatomic, assign) NSTimeInterval loadingViewFadeDuration;
- (instancetype)initWithBridge:(RCTBridge *)bridge
moduleName:(NSString *)moduleName
initialProperties:(NSDictionary *)initialProperties NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithBundleURL:(NSURL *)bundleURL
moduleName:(NSString *)moduleName
initialProperties:(NSDictionary *)initialProperties
launchOptions:(NSDictionary *)launchOptions;
- (void)cancelTouches;
@end
NS_ASSUME_NONNULL_END