react-native-navigation的迁移库

RNNTabBarOptions.m 625B

1234567891011121314151617181920212223242526
  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. return self;
  13. }
  14. -(void)mergeWith:(NSDictionary *)otherOptions {
  15. for (id key in otherOptions) {
  16. [self setValue:[otherOptions objectForKey:key] forKey:key];
  17. }
  18. }
  19. @end