#import "RNNNavigationOptions.h" #import @implementation RNNNavigationOptions -(instancetype)initWithDict:(NSDictionary *)navigationOptions { self = [super init]; self.topBarBackgroundColor = [navigationOptions objectForKey:@"topBarBackgroundColor"]; self.statusBarHidden = [navigationOptions objectForKey:@"statusBarHidden"]; self.title = [navigationOptions objectForKey:@"title"]; return self; } -(void)apply:(UIViewController*)viewController{ if (self.topBarBackgroundColor) { UIColor* backgroundColor = [RCTConvert UIColor:self.topBarBackgroundColor]; viewController.navigationController.navigationBar.barTintColor = backgroundColor; } if (self.title) { viewController.navigationItem.title = self.title; } } @end