react-native-navigation的迁移库

ReactNativeNavigation.m 675B

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