react-native-navigation的迁移库

RNNTabBarOptions.m 768B

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