react-native-navigation的迁移库

RNNTabItemOptions.m 679B

123456789101112131415161718192021222324252627282930313233
  1. #import "RNNTabItemOptions.h"
  2. @implementation RNNTabItemOptions
  3. -(instancetype)initWithDict:(NSDictionary *)tabItemDict {
  4. self = [super init];
  5. self.title = tabItemDict[@"title"];
  6. self.tag = [tabItemDict[@"tag"] integerValue];
  7. self.badge = tabItemDict[@"badge"];
  8. self.testID = tabItemDict[@"testID"];
  9. self.visible = tabItemDict[@"visible"];
  10. self.icon = tabItemDict[@"icon"];
  11. return self;
  12. }
  13. -(void)mergeWith:(NSDictionary *)otherOptions {
  14. for (id key in otherOptions) {
  15. [self setValue:[otherOptions objectForKey:key] forKey:key];
  16. }
  17. }
  18. -(void)resetOptions {
  19. self.title = nil;
  20. self.badge = nil;
  21. self.visible = nil;
  22. self.icon = nil;
  23. self.testID = nil;
  24. }
  25. @end