react-native-navigation的迁移库

ReactNativeNavigation.m 798B

1234567891011121314151617181920212223242526272829
  1. #import "ReactNativeNavigation.h"
  2. #import "RNNStore.h"
  3. #import "RCTBridge.h"
  4. #import "RNNSplashScreen.h"
  5. #import "RCTRootView.h";
  6. @implementation ReactNativeNavigation
  7. +(void)bootstrap:(NSURL *)jsCodeLocation
  8. {
  9. [ReactNativeNavigation bootstrap:jsCodeLocation launchOptions:nil];
  10. }
  11. +(void)bootstrap:(NSURL *)jsCodeLocation launchOptions:(NSDictionary *)launchOptions
  12. {
  13. RNNStore.appDelegate.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  14. RNNStore.appDelegate.window.backgroundColor = [UIColor whiteColor];
  15. [RNNSplashScreen showSplashScreenWhileLoadingJS];
  16. RNNStore.sharedInstance.bridge = [[RCTBridge alloc] initWithBundleURL:jsCodeLocation moduleProvider:nil launchOptions:launchOptions];
  17. }
  18. @end