RCTWrapperReactRootViewManager.m 862 B

1234567891011121314151617181920212223242526272829303132
  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 "RCTWrapperReactRootViewManager.h"
  8. #import <RCTWrapper/RCTWrapperView.h>
  9. #import <RCTWrapper/RCTWrapperViewControllerHostingView.h>
  10. #import "RCTWrapperReactRootViewController.h"
  11. @implementation RCTWrapperReactRootViewManager
  12. RCT_EXPORT_MODULE()
  13. - (UIView *)view
  14. {
  15. RCTWrapperViewControllerHostingView *contentViewControllerHostingView =
  16. [RCTWrapperViewControllerHostingView new];
  17. contentViewControllerHostingView.contentViewController =
  18. [[RCTWrapperReactRootViewController alloc] initWithBridge:self.bridge];
  19. RCTWrapperView *wrapperView = [super view];
  20. wrapperView.contentView = contentViewControllerHostingView;
  21. return wrapperView;
  22. }
  23. @end