react-native-navigation的迁移库

RNNComponentLifecycleEvent.m 789B

12345678910111213141516171819202122232425
  1. #import "RNNComponentLifecycleEvent.h"
  2. @interface RNNComponentLifecycleEvent()
  3. @property (nonatomic, strong) NSString* componentName;
  4. @property (nonatomic, strong) NSString* componentId;
  5. @property (nonatomic, strong) LifecycleEvent event;
  6. @end
  7. @implementation RNNComponentLifecycleEvent
  8. + (instancetype)create:(LifecycleEvent)event componentName:(NSString *)componentName componentId:(NSString *)componentId {
  9. RNNComponentLifecycleEvent* lifecycleEvent = [[RNNComponentLifecycleEvent alloc] init];
  10. lifecycleEvent.componentName = componentName;
  11. lifecycleEvent.componentId = componentId;
  12. lifecycleEvent.event = event;
  13. return lifecycleEvent;
  14. }
  15. - (NSDictionary *)body {
  16. return @{@"event": self.event, @"componentName": self.componentName, @"componentId": self.componentId};
  17. }
  18. @end