react-native-navigation的迁移库

RNNTopBarOptions.m 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #import "RNNTopBarOptions.h"
  2. @implementation RNNTopBarOptions
  3. -(instancetype)init {
  4. return [self initWithDict:@{}];
  5. }
  6. -(instancetype)initWithDict:(NSDictionary *)topBarOptions {
  7. self = [super init];
  8. self.title = [topBarOptions valueForKey:@"title"];
  9. self.backgroundColor = [topBarOptions valueForKey:@"backgroundColor"];
  10. self.textColor = [topBarOptions valueForKey:@"textColor"];
  11. self.textFontFamily = [topBarOptions valueForKey:@"textFontFamily"];
  12. self.textFontSize = [topBarOptions valueForKey:@"textFontSize"];
  13. self.hidden = [topBarOptions valueForKey:@"hidden"];
  14. self.hideOnScroll = [topBarOptions valueForKey:@"hideOnScroll"];
  15. self.buttonColor = [topBarOptions valueForKey:@"buttonColor"];
  16. self.blur = [topBarOptions valueForKey:@"blur"];
  17. self.translucent = [topBarOptions valueForKey:@"translucent"];
  18. self.transparent = [topBarOptions valueForKey:@"transparent"];
  19. self.noBorder = [topBarOptions valueForKey:@"noBorder"];
  20. self.animateHide = [topBarOptions valueForKey:@"animateHide"];
  21. self.largeTitle = [topBarOptions valueForKey:@"largeTitle"];
  22. self.testID = [topBarOptions valueForKey:@"testID"];
  23. return self;
  24. }
  25. -(void)mergeWith:(NSDictionary *)otherOptions {
  26. for (id key in otherOptions) {
  27. [self setValue:[otherOptions objectForKey:key] forKey:key];
  28. }
  29. }
  30. @end