react-native-navigation的迁移库

RNNTopBarOptions.m 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. return self;
  23. }
  24. -(void)mergeWith:(NSDictionary *)otherOptions {
  25. for (id key in otherOptions) {
  26. [self setValue:[otherOptions objectForKey:key] forKey:key];
  27. }
  28. }
  29. @end