1/*
2 * Copyright (c) Meta Platforms, Inc. and 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
8#import "ABI47_0_0RCTWrapperABI47_0_0ReactRootViewController.h"
9
10#import <ABI47_0_0RCTWrapper/ABI47_0_0RCTWrapper.h>
11#import <ABI47_0_0React/ABI47_0_0RCTBridge.h>
12#import <ABI47_0_0React/ABI47_0_0RCTRootView.h>
13
14#import "ABI47_0_0RCTWrapperExampleView.h"
15
16@implementation ABI47_0_0RCTWrapperABI47_0_0ReactRootViewController {
17  ABI47_0_0RCTBridge *_bridge;
18}
19
20- (instancetype)initWithBridge:(ABI47_0_0RCTBridge *)bridge
21{
22  if (self = [super initWithNibName:nil bundle:nil]) {
23    _bridge = bridge;
24  }
25
26  return self;
27}
28
29- (void)loadView
30{
31  ABI47_0_0RCTRootView *rootView =
32    [[ABI47_0_0RCTRootView alloc] initWithBridge:_bridge
33                             moduleName:@"WrapperExample"
34                      initialProperties:@{}];
35
36  rootView.backgroundColor = [UIColor whiteColor];
37
38  UIActivityIndicatorView *progressIndicatorView =
39    [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
40  [progressIndicatorView startAnimating];
41  rootView.loadingView = progressIndicatorView;
42
43  rootView.sizeFlexibility = ABI47_0_0RCTRootViewSizeFlexibilityWidthAndHeight;
44  self.view = rootView;
45}
46
47@end
48