react-native-navigation的迁移库

RNNTopBarOptions.m 1.1KB

123456789101112131415161718192021222324252627282930313233343536
  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.noBorder = [topBarOptions valueForKey:@"noBorder"];
  19. self.animateHide =[topBarOptions valueForKey:@"animateHide"];
  20. return self;
  21. }
  22. -(void)mergeWith:(NSDictionary *)otherOptions {
  23. for (id key in otherOptions) {
  24. [self setValue:[otherOptions objectForKey:key] forKey:key];
  25. }
  26. }
  27. @end