react-native-navigation的迁移库

RNNSideMenuOptions.m 578B

12345678910111213141516171819202122232425262728
  1. #import "RNNSideMenuOptions.h"
  2. @implementation RNNSideMenuOptions
  3. -(instancetype)init {
  4. return [self initWithDict:@{}];
  5. }
  6. -(instancetype)initWithDict:(NSDictionary *)sideMenuOptions {
  7. self = [super init];
  8. [self mergeWith:sideMenuOptions];
  9. return self;
  10. }
  11. -(void)mergeWith:(NSDictionary *)otherOptions {
  12. self.leftSideVisible = [[otherOptions valueForKey:@"left"] valueForKey:@"visible"];
  13. self.rightSideVisible = [[otherOptions valueForKey:@"right"] valueForKey:@"visible"];
  14. }
  15. -(void)resetOptions {
  16. self.leftSideVisible = nil;
  17. self.rightSideVisible = nil;
  18. }
  19. @end