react-native-navigation的迁移库

RNNBridgeModule.m 861B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #import "RNNBridgeModule.h"
  2. #import "RNNCommandsHandler.h"
  3. @implementation RNNBridgeModule
  4. RCT_EXPORT_MODULE();
  5. - (dispatch_queue_t)methodQueue {
  6. return dispatch_get_main_queue();
  7. }
  8. #pragma mark - JS interface
  9. RCT_EXPORT_METHOD(setRoot:(NSDictionary*)layout) {
  10. [[RNNCommandsHandler new] setRoot:layout];
  11. }
  12. RCT_EXPORT_METHOD(push:(NSString*)containerId layout:(NSDictionary*)layout) {
  13. [[RNNCommandsHandler new] push:containerId layout:layout];
  14. }
  15. RCT_EXPORT_METHOD(pop:(NSString*)containerId) {
  16. [[RNNCommandsHandler new] pop:containerId];
  17. }
  18. RCT_EXPORT_METHOD(showModal:(NSDictionary*)layout) {
  19. [[RNNCommandsHandler new] showModal:layout];
  20. }
  21. RCT_EXPORT_METHOD(dismissModal:(NSString*)containerId) {
  22. [[RNNCommandsHandler new] dismissModal:containerId];
  23. }
  24. RCT_EXPORT_METHOD(dismissAllModals) {
  25. [[RNNCommandsHandler new] dismissAllModals];
  26. }
  27. @end