react-native-navigation的迁移库

RNNBridgeModule.m 514B

12345678910111213141516171819202122232425
  1. #import "RNNBridgeModule.h"
  2. #import "RNNStore.h"
  3. #import "RNNControllerFactory.h"
  4. @implementation RNNBridgeModule
  5. RCT_EXPORT_MODULE(NativeNavigation);
  6. - (dispatch_queue_t)methodQueue
  7. {
  8. return dispatch_get_main_queue();
  9. }
  10. RCT_EXPORT_METHOD(startApp:(NSDictionary*)layout)
  11. {
  12. RCTBridge* bridge = RNNStore.sharedInstance.bridge;
  13. RNNStore.appDelegate.window.rootViewController = [RNNControllerFactory createRootViewController:layout];
  14. [RNNStore.appDelegate.window makeKeyAndVisible];
  15. }
  16. @end