react-native-navigation的迁移库

RNNTabBarOptions.m 679B

123456789101112131415161718192021222324252627
  1. #import "RNNTabBarOptions.h"
  2. @implementation RNNTabBarOptions
  3. -(instancetype)init {
  4. return [self initWithDict:@{}];
  5. }
  6. -(instancetype)initWithDict:(NSDictionary *)tabBarOptions {
  7. self = [super init];
  8. self.hidden = [tabBarOptions valueForKey:@"hidden"];
  9. self.animateHide = [tabBarOptions valueForKey:@"animateHide"];
  10. self.tabBadge = [tabBarOptions valueForKey:@"tabBadge"];
  11. self.currentTabIndex = [tabBarOptions valueForKey:@"currentTabIndex"];
  12. self.testID = [tabBarOptions valueForKey:@"testID"];
  13. return self;
  14. }
  15. -(void)mergeWith:(NSDictionary *)otherOptions {
  16. for (id key in otherOptions) {
  17. [self setValue:[otherOptions objectForKey:key] forKey:key];
  18. }
  19. }
  20. @end