react-native/React/Fabric/Surface/RCTFabricSurfaceHostingView.mm
Kevin Gozali e2462e9016 iOS: set the default measure size correctly for RCTSurfaceHostingView
Summary: The RCTRootView default needs to be translated during init of RCTSurfaceHostingView correctly.

Reviewed By: shergin

Differential Revision: D7327918

fbshipit-source-id: 67a2a42b554782b37a032cc0470d794554cc1e5a
2018-03-19 17:36:03 -07:00

27 lines
879 B
Plaintext

/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import "RCTFabricSurfaceHostingView.h"
#import "RCTFabricSurface.h"
@implementation RCTFabricSurfaceHostingView
- (instancetype)initWithBridge:(RCTBridge *)bridge
moduleName:(NSString *)moduleName
initialProperties:(NSDictionary *)initialProperties
sizeMeasureMode:(RCTSurfaceSizeMeasureMode)sizeMeasureMode
{
RCTFabricSurface *surface = [[RCTFabricSurface alloc] initWithBridge:bridge
moduleName:moduleName
initialProperties:initialProperties];
return [self initWithSurface:surface sizeMeasureMode:sizeMeasureMode];
}
@end