react-native-navigation的迁移库

RNNTabBarOptions.m 828B

123456789101112131415161718192021222324252627282930313233
  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.currentTabIndex = [tabBarOptions valueForKey:@"currentTabIndex"];
  11. self.testID = [tabBarOptions valueForKey:@"testID"];
  12. self.currentTabId = [tabBarOptions valueForKey:@"currentTabId"];
  13. self.drawUnder = [tabBarOptions valueForKey:@"drawUnder"];
  14. return self;
  15. }
  16. - (void)resetOptions {
  17. self.currentTabId = nil;
  18. self.currentTabIndex = nil;
  19. }
  20. -(void)mergeWith:(NSDictionary *)otherOptions {
  21. for (id key in otherOptions) {
  22. [self setValue:[otherOptions objectForKey:key] forKey:key];
  23. }
  24. }
  25. @end