ソースを参照

Feature/styling (#307)

* Set to use old bridge for compatibility with 0.30+

* Fixed crash occurring when tabBarBackgroundColor or tabBarButtonColor is not supplied

* Adds setStyle property to index.js

* Adds native code for setting style on RCCViewController

* Fixes setStyle function

* Fixes setting style on navigator

* Adds some styling to tab bar controller and fixes some bugs

* Adds ability to set modal presentation style

* Makes sure autoAdjustScrollViewInsets isn't propagated through when push another view controller

* Changes import to reference controllers rather than react-native-controllers and fixes setStyle mutating colours

* Fixed to work with RN 33

* Fixes updating title font styling with new RCCTitleViewHelper logic

* Fixes subtitle being shown

* Adds extendedLayoutIncludesOpaqueBars to navigation styling

* Adds ability to add shadows to text in navigation bar / tab bar

* Fixed merged ReactGateway.java file

* Fixed issue with rightButtons getting ignored in preference for empty Screen buttons

* Fixes compiler error
Simon Mitchell 8 年 前
コミット
356d42e063

+ 8
- 0
ios/Helpers/RCCTitleViewHelper.h ファイルの表示

9
 #import <Foundation/Foundation.h>
9
 #import <Foundation/Foundation.h>
10
 #import <UIKit/UIKit.h>
10
 #import <UIKit/UIKit.h>
11
 
11
 
12
+@interface RCCTitleView : UIView
13
+
14
+@property (nonatomic, strong) UILabel *titleLabel;
15
+
16
+@property (nonatomic, strong) UILabel *subtitleLabel;
17
+
18
+@end
19
+
12
 @interface RCCTitleViewHelper : NSObject
20
 @interface RCCTitleViewHelper : NSObject
13
 
21
 
14
 
22
 

+ 17
- 27
ios/Helpers/RCCTitleViewHelper.m ファイルの表示

8
 
8
 
9
 #import "RCCTitleViewHelper.h"
9
 #import "RCCTitleViewHelper.h"
10
 #import "RCTConvert.h"
10
 #import "RCTConvert.h"
11
+#import "RCTHelpers.h"
12
+
13
+@implementation RCCTitleView
14
+
15
+
16
+@end
11
 
17
 
12
 @interface RCCTitleViewHelper ()
18
 @interface RCCTitleViewHelper ()
13
 
19
 
18
 @property (nonatomic, strong) NSString *subtitle;
24
 @property (nonatomic, strong) NSString *subtitle;
19
 @property (nonatomic, strong) id titleImageData;
25
 @property (nonatomic, strong) id titleImageData;
20
 
26
 
21
-@property (nonatomic, strong) UIView *titleView;
27
+@property (nonatomic, strong) RCCTitleView *titleView;
22
 
28
 
23
 @end
29
 @end
24
 
30
 
50
     
56
     
51
     CGRect navigationBarBounds = self.navigationController.navigationBar.bounds;
57
     CGRect navigationBarBounds = self.navigationController.navigationBar.bounds;
52
     
58
     
53
-    UILabel *titleLabel;
54
-    UILabel *subtitleLabel;
55
-    
56
-    self.titleView = [[UIView alloc] initWithFrame:navigationBarBounds];
59
+    self.titleView = [[RCCTitleView alloc] initWithFrame:navigationBarBounds];
57
     self.titleView.backgroundColor = [UIColor clearColor];
60
     self.titleView.backgroundColor = [UIColor clearColor];
58
     self.titleView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
61
     self.titleView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
59
     self.titleView.clipsToBounds = YES;
62
     self.titleView.clipsToBounds = YES;
60
     
63
     
61
-    
62
     self.viewController.title = self.title;
64
     self.viewController.title = self.title;
63
     
65
     
64
     if ([self isTitleOnly]) {
66
     if ([self isTitleOnly]) {
74
     
76
     
75
     if (self.subtitle)
77
     if (self.subtitle)
76
     {
78
     {
77
-        subtitleLabel = [self setupSubtitle:style];
79
+        self.titleView.subtitleLabel = [self setupSubtitle:style];
78
     }
80
     }
79
     
81
     
80
     if (self.title)
82
     if (self.title)
81
     {
83
     {
82
-        titleLabel = [self setupTitle:style];
84
+        self.titleView.titleLabel = [self setupTitle:style];
83
     }
85
     }
84
     
86
     
85
-    [self centerTitleView:navigationBarBounds titleLabel:titleLabel subtitleLabel:subtitleLabel];
87
+    [self centerTitleView:navigationBarBounds titleLabel:self.titleView.titleLabel subtitleLabel:self.titleView.subtitleLabel];
86
     
88
     
87
     self.viewController.navigationItem.titleView = self.titleView;
89
     self.viewController.navigationItem.titleView = self.titleView;
88
 }
90
 }
135
     subtitleFrame.origin.y = subtitleFrame.size.height;
137
     subtitleFrame.origin.y = subtitleFrame.size.height;
136
     
138
     
137
     UILabel *subtitleLabel = [[UILabel alloc] initWithFrame:subtitleFrame];
139
     UILabel *subtitleLabel = [[UILabel alloc] initWithFrame:subtitleFrame];
138
-    subtitleLabel.text = self.subtitle;
139
     subtitleLabel.textAlignment = NSTextAlignmentCenter;
140
     subtitleLabel.textAlignment = NSTextAlignmentCenter;
140
     subtitleLabel.backgroundColor = [UIColor clearColor];
141
     subtitleLabel.backgroundColor = [UIColor clearColor];
141
     subtitleLabel.autoresizingMask = self.titleView.autoresizingMask;
142
     subtitleLabel.autoresizingMask = self.titleView.autoresizingMask;
142
-    UIFont *subtitleFont = [UIFont systemFontOfSize:14.f];
143
-    
144
-    id fontSize = style[@"navBarSubtitleFontSize"];
145
-    if (fontSize) {
146
-        CGFloat fontSizeFloat = [RCTConvert CGFloat:fontSize];
147
-        subtitleFont = [UIFont boldSystemFontOfSize:fontSizeFloat];
148
-    }
149
     
143
     
150
-    subtitleLabel.font = subtitleFont;
144
+    NSMutableDictionary *subtitleAttributes = [RCTHelpers textAttributesFromDictionary:style withPrefix:@"navBarSubtitle" baseFont:[UIFont systemFontOfSize:14.f]];
145
+    [subtitleLabel setAttributedText:[[NSAttributedString alloc] initWithString:self.subtitle attributes:subtitleAttributes]];
151
     
146
     
152
-    id navBarSubtitleTextColor = style[@"navBarSubtitleTextColor"];
153
-    if (navBarSubtitleTextColor)
154
-    {
155
-        UIColor *color = navBarSubtitleTextColor != (id)[NSNull null] ? [RCTConvert UIColor:navBarSubtitleTextColor] : nil;
156
-        subtitleLabel.textColor = color;
157
-    }
158
-    
159
-    CGSize labelSize = [subtitleLabel.text sizeWithAttributes:@{NSFontAttributeName:subtitleFont}];
147
+    CGSize labelSize = [subtitleLabel.text sizeWithAttributes:subtitleAttributes];
160
     CGRect labelframe = subtitleLabel.frame;
148
     CGRect labelframe = subtitleLabel.frame;
161
     labelframe.size = labelSize;
149
     labelframe.size = labelSize;
162
     subtitleLabel.frame = labelframe;
150
     subtitleLabel.frame = labelframe;
175
         titleFrame.size.height /= 2;
163
         titleFrame.size.height /= 2;
176
     }
164
     }
177
     UILabel *titleLabel = [[UILabel alloc] initWithFrame:titleFrame];
165
     UILabel *titleLabel = [[UILabel alloc] initWithFrame:titleFrame];
178
-    titleLabel.text = self.title;
179
     titleLabel.textAlignment = NSTextAlignmentCenter;
166
     titleLabel.textAlignment = NSTextAlignmentCenter;
180
     titleLabel.backgroundColor = [UIColor clearColor];
167
     titleLabel.backgroundColor = [UIColor clearColor];
181
     
168
     
191
     
178
     
192
     titleLabel.font = titleFont;
179
     titleLabel.font = titleFont;
193
     
180
     
181
+    NSMutableDictionary *titleAttributes = [RCTHelpers textAttributesFromDictionary:style withPrefix:@"navBarTitle" baseFont:[UIFont systemFontOfSize:14.f]];
182
+    [titleLabel setAttributedText:[[NSAttributedString alloc] initWithString:self.title attributes:titleAttributes]];
183
+    
194
     CGSize labelSize = [titleLabel.text sizeWithAttributes:@{NSFontAttributeName:titleFont}];
184
     CGSize labelSize = [titleLabel.text sizeWithAttributes:@{NSFontAttributeName:titleFont}];
195
     CGRect labelframe = titleLabel.frame;
185
     CGRect labelframe = titleLabel.frame;
196
     labelframe.size = labelSize;
186
     labelframe.size = labelSize;

+ 2
- 0
ios/Helpers/RCTHelpers.h ファイルの表示

11
 
11
 
12
 @interface RCTHelpers : NSObject
12
 @interface RCTHelpers : NSObject
13
 +(BOOL)removeYellowBox:(RCTRootView*)reactRootView;
13
 +(BOOL)removeYellowBox:(RCTRootView*)reactRootView;
14
++ (NSMutableDictionary *)textAttributesFromDictionary:(NSDictionary *)dictionary withPrefix:(NSString *)prefix;
15
++ (NSMutableDictionary *)textAttributesFromDictionary:(NSDictionary *)dictionary withPrefix:(NSString *)prefix baseFont:(UIFont *)font;
14
 @end
16
 @end

+ 130
- 4
ios/Helpers/RCTHelpers.m ファイルの表示

9
 #import "RCTHelpers.h"
9
 #import "RCTHelpers.h"
10
 #import "RCTView.h"
10
 #import "RCTView.h"
11
 #import "RCTScrollView.h"
11
 #import "RCTScrollView.h"
12
+#import "RCTFont.h"
12
 
13
 
13
 @implementation RCTHelpers
14
 @implementation RCTHelpers
14
 
15
 
24
 }
25
 }
25
 
26
 
26
 /*
27
 /*
27
-    The YellowBox is added to each RCTRootView. Regardless if there are warnings or not, if there's a warning anywhere in the app - it is added
28
-    Since it is always appears on the top, it blocks interactions with other components.
29
-    It is most noticeable in RCCLightBox and RCCNotification where button (for example) are not clickable if placed at the bottom part of the view
30
-*/
28
+ The YellowBox is added to each RCTRootView. Regardless if there are warnings or not, if there's a warning anywhere in the app - it is added
29
+ Since it is always appears on the top, it blocks interactions with other components.
30
+ It is most noticeable in RCCLightBox and RCCNotification where button (for example) are not clickable if placed at the bottom part of the view
31
+ */
31
 
32
 
32
 +(BOOL)removeYellowBox:(RCTRootView*)reactRootView
33
 +(BOOL)removeYellowBox:(RCTRootView*)reactRootView
33
 {
34
 {
74
     return removed;
75
     return removed;
75
 }
76
 }
76
 
77
 
78
++ (NSMutableDictionary *)textAttributesFromDictionary:(NSDictionary *)dictionary withPrefix:(NSString *)prefix baseFont:(UIFont *)baseFont
79
+{
80
+    NSMutableDictionary *textAttributes = [NSMutableDictionary new];
81
+    
82
+    NSString *colorKey = @"color";
83
+    NSString *familyKey = @"fontFamily";
84
+    NSString *weightKey = @"fontWeight";
85
+    NSString *sizeKey = @"fontSize";
86
+    NSString *styleKey = @"fontStyle";
87
+    NSString *shadowColourKey = @"shadowColor";
88
+    NSString *shadowOffsetKey = @"shadowOffset";
89
+    NSString *shadowBlurRadiusKey = @"shadowBlurRadius";
90
+    NSString *showShadowKey = @"showShadow";
91
+    
92
+    if (prefix) {
93
+        
94
+        colorKey = [colorKey stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:[colorKey substringToIndex:1].capitalizedString];
95
+        colorKey = [NSString stringWithFormat:@"%@%@", prefix, colorKey];
96
+        
97
+        familyKey = [familyKey stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:[familyKey substringToIndex:1].capitalizedString];
98
+        familyKey = [NSString stringWithFormat:@"%@%@", prefix, familyKey];
99
+        
100
+        weightKey = [weightKey stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:[weightKey substringToIndex:1].capitalizedString];
101
+        weightKey = [NSString stringWithFormat:@"%@%@", prefix, weightKey];
102
+        
103
+        sizeKey = [sizeKey stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:[sizeKey substringToIndex:1].capitalizedString];
104
+        sizeKey = [NSString stringWithFormat:@"%@%@", prefix, sizeKey];
105
+        
106
+        styleKey = [styleKey stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:[styleKey substringToIndex:1].capitalizedString];
107
+        styleKey = [NSString stringWithFormat:@"%@%@", prefix, styleKey];
108
+        
109
+        shadowColourKey = [shadowColourKey stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:[shadowColourKey substringToIndex:1].capitalizedString];
110
+        shadowColourKey = [NSString stringWithFormat:@"%@%@", prefix, shadowColourKey];
111
+        
112
+        shadowOffsetKey = [shadowOffsetKey stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:[shadowOffsetKey substringToIndex:1].capitalizedString];
113
+        shadowOffsetKey = [NSString stringWithFormat:@"%@%@", prefix, shadowOffsetKey];
114
+        
115
+        shadowBlurRadiusKey = [shadowBlurRadiusKey stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:[shadowBlurRadiusKey substringToIndex:1].capitalizedString];
116
+        shadowBlurRadiusKey = [NSString stringWithFormat:@"%@%@", prefix, shadowBlurRadiusKey];
117
+        
118
+        showShadowKey = [showShadowKey stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:[showShadowKey substringToIndex:1].capitalizedString];
119
+        showShadowKey = [NSString stringWithFormat:@"%@%@", prefix, showShadowKey];
120
+    }
121
+    
122
+    NSShadow *shadow;
123
+    
124
+    NSNumber *shadowColor = dictionary[shadowColourKey];
125
+    if (shadowColor && [shadowColor isKindOfClass:[NSNumber class]]) {
126
+        if (!shadow) {
127
+            shadow = [NSShadow new];
128
+        }
129
+        shadow.shadowColor = [RCTConvert UIColor:shadowColor];
130
+    }
131
+    
132
+    NSDictionary *shadowOffsetDict = dictionary[shadowOffsetKey];
133
+    if (shadowOffsetDict && [shadowOffsetDict isKindOfClass:[NSDictionary class]]) {
134
+        CGSize shadowOffset = [RCTConvert CGSize:shadowOffsetDict];
135
+        if (!shadow) {
136
+            shadow = [NSShadow new];
137
+        }
138
+        shadow.shadowOffset = shadowOffset;
139
+    }
140
+    
141
+    NSNumber *shadowRadius = dictionary[shadowBlurRadiusKey];
142
+    if (shadowRadius) {
143
+        CGFloat radius = [RCTConvert CGFloat:shadowRadius];
144
+        if (!shadow) {
145
+            shadow = [NSShadow new];
146
+        }
147
+        shadow.shadowBlurRadius = radius;
148
+    }
149
+    
150
+    NSNumber *showShadow = dictionary[showShadowKey];
151
+    if (showShadow) {
152
+        BOOL show = [RCTConvert BOOL:showShadow];
153
+        if (!show) {
154
+            shadow = nil;
155
+        }
156
+    }
157
+    
158
+    if (shadow) {
159
+        [textAttributes setObject:shadow forKey:NSShadowAttributeName];
160
+    }
161
+    
162
+    NSNumber *textColor = dictionary[colorKey];
163
+    if (textColor && [textColor isKindOfClass:[NSNumber class]])
164
+    {
165
+        UIColor *color = [RCTConvert UIColor:textColor];
166
+        [textAttributes setObject:color forKey:NSForegroundColorAttributeName];
167
+    }
168
+    
169
+    NSString *fontFamily = dictionary[familyKey];
170
+    if (![fontFamily isKindOfClass:[NSString class]]) {
171
+        fontFamily = nil;
172
+    }
173
+    
174
+    NSString *fontWeight = dictionary[weightKey];
175
+    if (![fontWeight isKindOfClass:[NSString class]]) {
176
+        fontWeight = nil;
177
+    }
178
+    
179
+    NSNumber *fontSize = dictionary[sizeKey];
180
+    if (![fontSize isKindOfClass:[NSNumber class]]) {
181
+        fontSize = nil;
182
+    }
183
+    
184
+    NSNumber *fontStyle = dictionary[styleKey];
185
+    if (![fontStyle isKindOfClass:[NSString class]]) {
186
+        fontStyle = nil;
187
+    }
188
+    
189
+    UIFont *font = [RCTFont updateFont:baseFont withFamily:fontFamily size:fontSize weight:fontWeight style:fontStyle variant:nil scaleMultiplier:1];
190
+    
191
+    if (font && (fontStyle || fontWeight || fontSize || fontFamily)) {
192
+        [textAttributes setObject:font forKey:NSFontAttributeName];
193
+    }
194
+    
195
+    return textAttributes;
196
+}
197
+
198
++ (NSMutableDictionary *)textAttributesFromDictionary:(NSDictionary *)dictionary withPrefix:(NSString *)prefix
199
+{
200
+    return [self textAttributesFromDictionary:dictionary withPrefix:prefix baseFont:[UIFont systemFontOfSize:[UIFont systemFontSize]]];
201
+}
202
+
77
 
203
 
78
 @end
204
 @end

+ 111
- 75
ios/RCCManagerModule.m ファイルの表示

27
                       }), RCCManagerModuleCantCreateControllerErrorCode, integerValue)
27
                       }), RCCManagerModuleCantCreateControllerErrorCode, integerValue)
28
 @end
28
 @end
29
 
29
 
30
+@implementation RCTConvert (UIModalPresentationStyle)
31
+
32
+RCT_ENUM_CONVERTER(UIModalPresentationStyle,
33
+                   (@{@"fullScreen": @(UIModalPresentationFullScreen),
34
+                      @"pageSheet": @(UIModalPresentationPageSheet),
35
+                      @"formSheet": @(UIModalPresentationFormSheet),
36
+                      @"currentContext": @(UIModalPresentationCurrentContext),
37
+                      @"custom": @(UIModalPresentationCustom),
38
+                      @"overFullScreen": @(UIModalPresentationOverFullScreen),
39
+                      @"overCurrentContext": @(UIModalPresentationOverCurrentContext),
40
+                      @"popover": @(UIModalPresentationPopover),
41
+                      @"none": @(UIModalPresentationNone)
42
+                      }), UIModalPresentationFullScreen, integerValue)
43
+
44
+@end
45
+
30
 @implementation RCCManagerModule
46
 @implementation RCCManagerModule
31
 
47
 
32
 RCT_EXPORT_MODULE(RCCManager);
48
 RCT_EXPORT_MODULE(RCCManager);
39
              //Error codes
55
              //Error codes
40
              @"RCCManagerModuleCantCreateControllerErrorCode" : @(RCCManagerModuleCantCreateControllerErrorCode),
56
              @"RCCManagerModuleCantCreateControllerErrorCode" : @(RCCManagerModuleCantCreateControllerErrorCode),
41
              @"RCCManagerModuleCantFindTabControllerErrorCode" : @(RCCManagerModuleCantFindTabControllerErrorCode),
57
              @"RCCManagerModuleCantFindTabControllerErrorCode" : @(RCCManagerModuleCantFindTabControllerErrorCode),
58
+             @"PresentFullScreen": @"fullScreen",
59
+             @"PresentPageSheet": @"pageSheet",
60
+             @"PresentFormSheet": @"formSheet",
61
+             @"PresentCurrentContext": @"currentContext",
62
+             @"PresentCustom": @"custom",
63
+             @"PresentOverFullScreen": @"overFullScreen",
64
+             @"PresentOverCurrentContext": @"overCurrentContext",
65
+             @"PresentPopover": @"popover",
66
+             @"PresentNone": @"none"
42
              };
67
              };
43
 }
68
 }
44
 
69
 
119
     if (allPresentedViewControllers.count > 0)
144
     if (allPresentedViewControllers.count > 0)
120
     {
145
     {
121
         dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),^
146
         dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),^
122
-        {
123
-            __block NSUInteger counter = 0;
124
-            for (UIViewController *viewController in allPresentedViewControllers)
125
-            {
126
-                counter++;
127
-                
128
-                [[RCCManager sharedIntance] unregisterController:viewController];
129
-                if (viewController.presentedViewController != nil)
130
-                {
131
-                    dispatch_semaphore_t dismiss_sema = dispatch_semaphore_create(0);
132
-                    
133
-                    dispatch_async(dispatch_get_main_queue(), ^
134
-                    {
135
-                        [viewController dismissViewControllerAnimated:NO completion:^()
136
-                         {
137
-                             if (counter == allPresentedViewControllers.count && allPresentedViewControllers.count > 0)
138
-                             {
139
-                                 [allPresentedViewControllers removeAllObjects];
140
-                                 
141
-                                 if (resolve != nil)
142
-                                 {
143
-                                     resolve(nil);
144
-                                 }
145
-                             }
146
-                             dispatch_semaphore_signal(dismiss_sema);
147
-                         }];
148
-                    });
149
-                    
150
-                    dispatch_semaphore_wait(dismiss_sema, DISPATCH_TIME_FOREVER);
151
-                }
152
-                else if (counter == allPresentedViewControllers.count && allPresentedViewControllers.count > 0)
153
-                {
154
-                    [allPresentedViewControllers removeAllObjects];
155
-                    
156
-                    if (resolve != nil)
157
-                    {
158
-                        dispatch_async(dispatch_get_main_queue(), ^
159
-                        {
160
-                            resolve(nil);
161
-                        });
162
-                    }
163
-                }
164
-            }
165
-        });
147
+                       {
148
+                           __block NSUInteger counter = 0;
149
+                           for (UIViewController *viewController in allPresentedViewControllers)
150
+                           {
151
+                               counter++;
152
+                               
153
+                               [[RCCManager sharedIntance] unregisterController:viewController];
154
+                               if (viewController.presentedViewController != nil)
155
+                               {
156
+                                   dispatch_semaphore_t dismiss_sema = dispatch_semaphore_create(0);
157
+                                   
158
+                                   dispatch_async(dispatch_get_main_queue(), ^
159
+                                                  {
160
+                                                      [viewController dismissViewControllerAnimated:NO completion:^()
161
+                                                       {
162
+                                                           if (counter == allPresentedViewControllers.count && allPresentedViewControllers.count > 0)
163
+                                                           {
164
+                                                               [allPresentedViewControllers removeAllObjects];
165
+                                                               
166
+                                                               if (resolve != nil)
167
+                                                               {
168
+                                                                   resolve(nil);
169
+                                                               }
170
+                                                           }
171
+                                                           dispatch_semaphore_signal(dismiss_sema);
172
+                                                       }];
173
+                                                  });
174
+                                   
175
+                                   dispatch_semaphore_wait(dismiss_sema, DISPATCH_TIME_FOREVER);
176
+                               }
177
+                               else if (counter == allPresentedViewControllers.count && allPresentedViewControllers.count > 0)
178
+                               {
179
+                                   [allPresentedViewControllers removeAllObjects];
180
+                                   
181
+                                   if (resolve != nil)
182
+                                   {
183
+                                       dispatch_async(dispatch_get_main_queue(), ^
184
+                                                      {
185
+                                                          resolve(nil);
186
+                                                      });
187
+                                   }
188
+                               }
189
+                           }
190
+                       });
166
     }
191
     }
167
     else if (resolve != nil)
192
     else if (resolve != nil)
168
     {
193
     {
173
 #pragma mark - RCT exported methods
198
 #pragma mark - RCT exported methods
174
 
199
 
175
 RCT_EXPORT_METHOD(
200
 RCT_EXPORT_METHOD(
176
-setRootController:(NSDictionary*)layout animationType:(NSString*)animationType globalProps:(NSDictionary*)globalProps)
201
+                  setRootController:(NSDictionary*)layout animationType:(NSString*)animationType globalProps:(NSDictionary*)globalProps)
177
 {
202
 {
178
     if ([[RCCManager sharedInstance] getBridge].loading) {
203
     if ([[RCCManager sharedInstance] getBridge].loading) {
179
         [self deferSetRootControllerWhileBridgeLoading:layout animationType:animationType globalProps:globalProps];
204
         [self deferSetRootControllerWhileBridgeLoading:layout animationType:animationType globalProps:globalProps];
182
     
207
     
183
     dispatch_async(dispatch_get_main_queue(), ^{
208
     dispatch_async(dispatch_get_main_queue(), ^{
184
         [self performSetRootController:layout animationType:animationType globalProps:globalProps];
209
         [self performSetRootController:layout animationType:animationType globalProps:globalProps];
185
-   });
210
+    });
186
 }
211
 }
187
 
212
 
188
 /**
213
 /**
239
 }
264
 }
240
 
265
 
241
 RCT_EXPORT_METHOD(
266
 RCT_EXPORT_METHOD(
242
-NavigationControllerIOS:(NSString*)controllerId performAction:(NSString*)performAction actionParams:(NSDictionary*)actionParams)
267
+                  NavigationControllerIOS:(NSString*)controllerId performAction:(NSString*)performAction actionParams:(NSDictionary*)actionParams)
243
 {
268
 {
244
-  if (!controllerId || !performAction) return;
245
-  RCCNavigationController* controller = [[RCCManager sharedInstance] getControllerWithId:controllerId componentType:@"NavigationControllerIOS"];
246
-  if (!controller || ![controller isKindOfClass:[RCCNavigationController class]]) return;
247
-  return [controller performAction:performAction actionParams:actionParams bridge:[[RCCManager sharedInstance] getBridge]];
269
+    if (!controllerId || !performAction) return;
270
+    RCCNavigationController* controller = [[RCCManager sharedInstance] getControllerWithId:controllerId componentType:@"NavigationControllerIOS"];
271
+    if (!controller || ![controller isKindOfClass:[RCCNavigationController class]]) return;
272
+    return [controller performAction:performAction actionParams:actionParams bridge:[[RCCManager sharedInstance] getBridge]];
248
 }
273
 }
249
 
274
 
250
 RCT_EXPORT_METHOD(
275
 RCT_EXPORT_METHOD(
251
-DrawerControllerIOS:(NSString*)controllerId performAction:(NSString*)performAction actionParams:(NSDictionary*)actionParams)
276
+                  DrawerControllerIOS:(NSString*)controllerId performAction:(NSString*)performAction actionParams:(NSDictionary*)actionParams)
252
 {
277
 {
253
-  if (!controllerId || !performAction) return;
254
-
255
-  id<RCCDrawerDelegate> controller = [[RCCManager sharedIntance] getControllerWithId:controllerId componentType:@"DrawerControllerIOS"];
256
-  if (!controller || (![controller isKindOfClass:[RCCDrawerController class]] && ![controller isKindOfClass:[RCCTheSideBarManagerViewController class]])) return;
257
-  return [controller performAction:performAction actionParams:actionParams bridge:[[RCCManager sharedIntance] getBridge]];
258
-
278
+    if (!controllerId || !performAction) return;
279
+    
280
+    id<RCCDrawerDelegate> controller = [[RCCManager sharedIntance] getControllerWithId:controllerId componentType:@"DrawerControllerIOS"];
281
+    if (!controller || (![controller isKindOfClass:[RCCDrawerController class]] && ![controller isKindOfClass:[RCCTheSideBarManagerViewController class]])) return;
282
+    return [controller performAction:performAction actionParams:actionParams bridge:[[RCCManager sharedIntance] getBridge]];
283
+    
259
 }
284
 }
260
 
285
 
261
 RCT_EXPORT_METHOD(
286
 RCT_EXPORT_METHOD(
262
-TabBarControllerIOS:(NSString*)controllerId performAction:(NSString*)performAction actionParams:(NSDictionary*)actionParams resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
287
+                  TabBarControllerIOS:(NSString*)controllerId performAction:(NSString*)performAction actionParams:(NSDictionary*)actionParams resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
263
 {
288
 {
264
     if (!controllerId || !performAction)
289
     if (!controllerId || !performAction)
265
     {
290
     {
279
 }
304
 }
280
 
305
 
281
 RCT_EXPORT_METHOD(
306
 RCT_EXPORT_METHOD(
282
-modalShowLightBox:(NSDictionary*)params)
307
+                  modalShowLightBox:(NSDictionary*)params)
283
 {
308
 {
284
     [RCCLightBox showWithParams:params];
309
     [RCCLightBox showWithParams:params];
285
 }
310
 }
286
 
311
 
287
 RCT_EXPORT_METHOD(
312
 RCT_EXPORT_METHOD(
288
-modalDismissLightBox)
313
+                  modalDismissLightBox)
289
 {
314
 {
290
     [RCCLightBox dismiss];
315
     [RCCLightBox dismiss];
291
 }
316
 }
292
 
317
 
293
 RCT_EXPORT_METHOD(
318
 RCT_EXPORT_METHOD(
294
-showController:(NSDictionary*)layout animationType:(NSString*)animationType globalProps:(NSDictionary*)globalProps resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
319
+                  showController:(NSDictionary*)layout animationType:(NSString*)animationType globalProps:(NSDictionary*)globalProps resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
295
 {
320
 {
296
     UIViewController *controller = [RCCViewController controllerWithLayout:layout globalProps:globalProps bridge:[[RCCManager sharedInstance] getBridge]];
321
     UIViewController *controller = [RCCViewController controllerWithLayout:layout globalProps:globalProps bridge:[[RCCManager sharedInstance] getBridge]];
297
     if (controller == nil)
322
     if (controller == nil)
300
                                                 error:[RCCManagerModule rccErrorWithCode:RCCManagerModuleCantCreateControllerErrorCode description:@"could not create controller"]];
325
                                                 error:[RCCManagerModule rccErrorWithCode:RCCManagerModuleCantCreateControllerErrorCode description:@"could not create controller"]];
301
         return;
326
         return;
302
     }
327
     }
303
-
328
+    
329
+    if (layout[@"props"] && [layout[@"props"] isKindOfClass:[NSDictionary class]] && layout[@"props"][@"style"] && [layout[@"props"][@"style"] isKindOfClass: [NSDictionary class]]) {
330
+        
331
+        NSDictionary *style = layout[@"props"][@"style"];
332
+        if (style[@"modalPresentationStyle"] && [style[@"modalPresentationStyle"] isKindOfClass:[NSString class]]) {
333
+            
334
+            NSString *presentationStyle = style[@"modalPresentationStyle"];
335
+            UIModalPresentationStyle modalPresentationStyle = [RCTConvert UIModalPresentationStyle:presentationStyle];
336
+            controller.modalPresentationStyle = modalPresentationStyle;
337
+        }
338
+    }
339
+    
304
     [[RCCManagerModule lastModalPresenterViewController] presentViewController:controller
340
     [[RCCManagerModule lastModalPresenterViewController] presentViewController:controller
305
-                                                           animated:![animationType isEqualToString:@"none"]
306
-                                                         completion:^(){ resolve(nil); }];
341
+                                                                      animated:![animationType isEqualToString:@"none"]
342
+                                                                    completion:^(){ resolve(nil); }];
307
 }
343
 }
308
 
344
 
309
 -(BOOL)viewControllerIsModal:(UIViewController*)viewController
345
 -(BOOL)viewControllerIsModal:(UIViewController*)viewController
310
 {
346
 {
311
     BOOL viewControllerIsModal = (viewController.presentingViewController.presentedViewController == viewController)
347
     BOOL viewControllerIsModal = (viewController.presentingViewController.presentedViewController == viewController)
312
-                                || ((viewController.navigationController != nil) && (viewController.navigationController.presentingViewController.presentedViewController == viewController.navigationController) && (viewController == viewController.navigationController.viewControllers[0]))
313
-                                || ([viewController.tabBarController.presentingViewController isKindOfClass:[UITabBarController class]]);
348
+    || ((viewController.navigationController != nil) && (viewController.navigationController.presentingViewController.presentedViewController == viewController.navigationController) && (viewController == viewController.navigationController.viewControllers[0]))
349
+    || ([viewController.tabBarController.presentingViewController isKindOfClass:[UITabBarController class]]);
314
     return viewControllerIsModal;
350
     return viewControllerIsModal;
315
 }
351
 }
316
 
352
 
317
 RCT_EXPORT_METHOD(
353
 RCT_EXPORT_METHOD(
318
-dismissController:(NSString*)animationType resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
354
+                  dismissController:(NSString*)animationType resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
319
 {
355
 {
320
     UIViewController* vc = [RCCManagerModule lastModalPresenterViewController];
356
     UIViewController* vc = [RCCManagerModule lastModalPresenterViewController];
321
     if ([self viewControllerIsModal:vc])
357
     if ([self viewControllerIsModal:vc])
332
 }
368
 }
333
 
369
 
334
 RCT_EXPORT_METHOD(
370
 RCT_EXPORT_METHOD(
335
-dismissAllControllers:(NSString*)animationType resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
371
+                  dismissAllControllers:(NSString*)animationType resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
336
 {
372
 {
337
     if([UIApplication sharedApplication].delegate.window.rootViewController.presentedViewController == nil)
373
     if([UIApplication sharedApplication].delegate.window.rootViewController.presentedViewController == nil)
338
     {//if there are no modal - do nothing
374
     {//if there are no modal - do nothing
351
         [appDelegate.window addSubview:snapshot];
387
         [appDelegate.window addSubview:snapshot];
352
         
388
         
353
         [self dismissAllModalPresenters:allPresentedViewControllers resolver:^(id result)
389
         [self dismissAllModalPresenters:allPresentedViewControllers resolver:^(id result)
354
-        {
355
-            [self animateSnapshot:snapshot animationType:animationType resolver:resolve];
356
-        }];
390
+         {
391
+             [self animateSnapshot:snapshot animationType:animationType resolver:resolve];
392
+         }];
357
     }
393
     }
358
     else
394
     else
359
     {
395
     {
362
 }
398
 }
363
 
399
 
364
 RCT_EXPORT_METHOD(
400
 RCT_EXPORT_METHOD(
365
-showNotification:(NSDictionary*)params resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
401
+                  showNotification:(NSDictionary*)params resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
366
 {
402
 {
367
     [RCCNotification showWithParams:params resolver:resolve rejecter:reject];
403
     [RCCNotification showWithParams:params resolver:resolve rejecter:reject];
368
 }
404
 }
369
 
405
 
370
 RCT_EXPORT_METHOD(
406
 RCT_EXPORT_METHOD(
371
-dismissNotification:(NSDictionary*)params resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
407
+                  dismissNotification:(NSDictionary*)params resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
372
 {
408
 {
373
     [RCCNotification dismissWithParams:params resolver:resolve rejecter:reject];
409
     [RCCNotification dismissWithParams:params resolver:resolve rejecter:reject];
374
 }
410
 }
375
 
411
 
376
 RCT_EXPORT_METHOD(
412
 RCT_EXPORT_METHOD(
377
-cancelAllReactTouches)
413
+                  cancelAllReactTouches)
378
 {
414
 {
379
     [RCCManagerModule cancelAllRCCViewControllerReactTouches];
415
     [RCCManagerModule cancelAllRCCViewControllerReactTouches];
380
 }
416
 }

+ 24
- 0
ios/RCCNavigationController.m ファイルの表示

77
       [mergedStyle removeObjectForKey:@"navBarBlur"];
77
       [mergedStyle removeObjectForKey:@"navBarBlur"];
78
       [mergedStyle removeObjectForKey:@"navBarTranslucent"];
78
       [mergedStyle removeObjectForKey:@"navBarTranslucent"];
79
       [mergedStyle removeObjectForKey:@"statusBarHideWithNavBar"];
79
       [mergedStyle removeObjectForKey:@"statusBarHideWithNavBar"];
80
+      [mergedStyle removeObjectForKey:@"autoAdjustScrollViewInsets"];
80
       [mergedStyle removeObjectForKey:@"statusBarTextColorSchemeSingleScreen"];
81
       [mergedStyle removeObjectForKey:@"statusBarTextColorSchemeSingleScreen"];
81
       
82
       
82
       [mergedStyle addEntriesFromDictionary:navigatorStyle];
83
       [mergedStyle addEntriesFromDictionary:navigatorStyle];
207
     [topViewController setNavBarVisibilityChange:animatedBool];
208
     [topViewController setNavBarVisibilityChange:animatedBool];
208
     
209
     
209
   }
210
   }
211
+    
212
+    // setStyle
213
+    if ([performAction isEqualToString:@"setStyle"])
214
+    {
215
+        
216
+        NSDictionary *navigatorStyle = actionParams;
217
+        
218
+        // merge the navigatorStyle of our parent
219
+        if ([self.topViewController isKindOfClass:[RCCViewController class]])
220
+        {
221
+            RCCViewController *parent = (RCCViewController*)self.topViewController;
222
+            NSMutableDictionary *mergedStyle = [NSMutableDictionary dictionaryWithDictionary:parent.navigatorStyle];
223
+            
224
+            // there are a few styles that we don't want to remember from our parent (they should be local)
225
+            [mergedStyle setValuesForKeysWithDictionary:navigatorStyle];
226
+            navigatorStyle = mergedStyle;
227
+            
228
+            parent.navigatorStyle = navigatorStyle;
229
+            
230
+            [parent setStyleOnInit];
231
+            [parent updateStyle];
232
+        }
233
+    }
210
 }
234
 }
211
 
235
 
212
 -(void)onButtonPress:(UIBarButtonItem*)barButtonItem
236
 -(void)onButtonPress:(UIBarButtonItem*)barButtonItem

+ 14
- 11
ios/RCCTabBarController.m ファイルの表示

2
 #import "RCCViewController.h"
2
 #import "RCCViewController.h"
3
 #import "RCTConvert.h"
3
 #import "RCTConvert.h"
4
 #import "RCCManager.h"
4
 #import "RCCManager.h"
5
+#import "RCTHelpers.h"
5
 #import "RCTUIManager.h"
6
 #import "RCTUIManager.h"
6
 
7
 
7
 @interface RCTUIManager ()
8
 @interface RCTUIManager ()
118
     viewController.tabBarItem = [[UITabBarItem alloc] initWithTitle:title image:iconImage tag:0];
119
     viewController.tabBarItem = [[UITabBarItem alloc] initWithTitle:title image:iconImage tag:0];
119
     viewController.tabBarItem.accessibilityIdentifier = tabItemLayout[@"props"][@"testID"];
120
     viewController.tabBarItem.accessibilityIdentifier = tabItemLayout[@"props"][@"testID"];
120
     viewController.tabBarItem.selectedImage = iconImageSelected;
121
     viewController.tabBarItem.selectedImage = iconImageSelected;
121
-
122
-    if (buttonColor)
123
-    {
124
-      [viewController.tabBarItem setTitleTextAttributes:
125
-       @{NSForegroundColorAttributeName : buttonColor} forState:UIControlStateNormal];
122
+    
123
+    NSMutableDictionary *unselectedAttributes = [RCTHelpers textAttributesFromDictionary:tabsStyle withPrefix:@"tabBarText" baseFont:[UIFont systemFontOfSize:10]];
124
+    if (!unselectedAttributes[NSForegroundColorAttributeName] && buttonColor) {
125
+      unselectedAttributes[NSForegroundColorAttributeName] = buttonColor;
126
     }
126
     }
127
-
128
-    if (selectedButtonColor)
129
-    {
130
-      [viewController.tabBarItem setTitleTextAttributes:
131
-       @{NSForegroundColorAttributeName : selectedButtonColor} forState:UIControlStateSelected];
127
+    
128
+    [viewController.tabBarItem setTitleTextAttributes:unselectedAttributes forState:UIControlStateNormal]
129
+    ;
130
+    
131
+    NSMutableDictionary *selectedAttributes = [RCTHelpers textAttributesFromDictionary:tabsStyle withPrefix:@"tabBarSelectedText" baseFont:[UIFont systemFontOfSize:10]];
132
+    if (!selectedAttributes[NSForegroundColorAttributeName] && selectedButtonColor) {
133
+      selectedAttributes[NSForegroundColorAttributeName] = selectedButtonColor;
132
     }
134
     }
133
-
135
+    
136
+    [viewController.tabBarItem setTitleTextAttributes:selectedAttributes forState:UIControlStateSelected];
134
     // create badge
137
     // create badge
135
     NSObject *badge = tabItemLayout[@"props"][@"badge"];
138
     NSObject *badge = tabItemLayout[@"props"][@"badge"];
136
     if (badge == nil || [badge isEqual:[NSNull null]])
139
     if (badge == nil || [badge isEqual:[NSNull null]])

+ 1
- 0
ios/RCCViewController.h ファイルの表示

14
 - (instancetype)initWithComponent:(NSString *)component passProps:(NSDictionary *)passProps navigatorStyle:(NSDictionary*)navigatorStyle globalProps:(NSDictionary *)globalProps bridge:(RCTBridge *)bridge;
14
 - (instancetype)initWithComponent:(NSString *)component passProps:(NSDictionary *)passProps navigatorStyle:(NSDictionary*)navigatorStyle globalProps:(NSDictionary *)globalProps bridge:(RCTBridge *)bridge;
15
 - (void)setStyleOnAppear;
15
 - (void)setStyleOnAppear;
16
 - (void)setStyleOnInit;
16
 - (void)setStyleOnInit;
17
+- (void)updateStyle;
17
 - (void)setNavBarVisibilityChange:(BOOL)animated;
18
 - (void)setNavBarVisibilityChange:(BOOL)animated;
18
 
19
 
19
 @end
20
 @end

+ 141
- 133
ios/RCCViewController.m ファイルの表示

7
 #import "RCCManager.h"
7
 #import "RCCManager.h"
8
 #import "RCTConvert.h"
8
 #import "RCTConvert.h"
9
 #import "RCCExternalViewControllerProtocol.h"
9
 #import "RCCExternalViewControllerProtocol.h"
10
+#import "RCTHelpers.h"
11
+#import "RCCTitleViewHelper.h"
10
 
12
 
11
 NSString* const RCCViewControllerCancelReactTouchesNotification = @"RCCViewControllerCancelReactTouchesNotification";
13
 NSString* const RCCViewControllerCancelReactTouchesNotification = @"RCCViewControllerCancelReactTouchesNotification";
12
 
14
 
189
 // we want to reset the style to what we expect (so we need to reset on every willAppear)
191
 // we want to reset the style to what we expect (so we need to reset on every willAppear)
190
 - (void)setStyleOnAppear
192
 - (void)setStyleOnAppear
191
 {
193
 {
192
-    [self setStyleOnAppearForViewController:self];
194
+    [self setStyleOnAppearForViewController:self appeared:false];
193
 }
195
 }
194
 
196
 
195
--(void)setStyleOnAppearForViewController:(UIViewController*)viewController
197
+- (void)updateStyle
196
 {
198
 {
199
+    [self setStyleOnAppearForViewController:self appeared:true];
200
+}
201
+
202
+-(void)setStyleOnAppearForViewController:(UIViewController*)viewController appeared:(BOOL)appeared
203
+{
204
+
197
     NSString *screenBackgroundColor = self.navigatorStyle[@"screenBackgroundColor"];
205
     NSString *screenBackgroundColor = self.navigatorStyle[@"screenBackgroundColor"];
198
-    if (screenBackgroundColor)
199
-    {
206
+    if (screenBackgroundColor) {
207
+        
200
         UIColor *color = screenBackgroundColor != (id)[NSNull null] ? [RCTConvert UIColor:screenBackgroundColor] : nil;
208
         UIColor *color = screenBackgroundColor != (id)[NSNull null] ? [RCTConvert UIColor:screenBackgroundColor] : nil;
201
-        self.view.backgroundColor = color;
209
+        viewController.view.backgroundColor = color;
202
     }
210
     }
203
     
211
     
204
     NSString *navBarBackgroundColor = self.navigatorStyle[@"navBarBackgroundColor"];
212
     NSString *navBarBackgroundColor = self.navigatorStyle[@"navBarBackgroundColor"];
205
-    if (navBarBackgroundColor)
206
-    {
213
+    if (navBarBackgroundColor) {
214
+        
207
         UIColor *color = navBarBackgroundColor != (id)[NSNull null] ? [RCTConvert UIColor:navBarBackgroundColor] : nil;
215
         UIColor *color = navBarBackgroundColor != (id)[NSNull null] ? [RCTConvert UIColor:navBarBackgroundColor] : nil;
208
         viewController.navigationController.navigationBar.barTintColor = color;
216
         viewController.navigationController.navigationBar.barTintColor = color;
209
-    }
210
-    else
211
-    {
217
+        
218
+    } else {
212
         viewController.navigationController.navigationBar.barTintColor = nil;
219
         viewController.navigationController.navigationBar.barTintColor = nil;
213
     }
220
     }
214
-    
215
-    NSString *navBarTextColor = self.navigatorStyle[@"navBarTextColor"];
216
-    if (navBarTextColor)
217
-    {
218
-        UIColor *color = navBarTextColor != (id)[NSNull null] ? [RCTConvert UIColor:navBarTextColor] : nil;
219
-        [viewController.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : color}];
221
+
222
+    NSMutableDictionary *titleTextAttributes = [RCTHelpers textAttributesFromDictionary:self.navigatorStyle withPrefix:@"navBarText" baseFont:[UIFont boldSystemFontOfSize:17]];
223
+    [self.navigationController.navigationBar setTitleTextAttributes:titleTextAttributes];
224
+
225
+    if (self.navigationItem.titleView && [self.navigationItem.titleView isKindOfClass:[RCCTitleView class]]) {
226
+        
227
+        RCCTitleView *titleView = (RCCTitleView *)self.navigationItem.titleView;
228
+        RCCTitleViewHelper *helper = [[RCCTitleViewHelper alloc] init:viewController navigationController:viewController.navigationController title:titleView.titleLabel.text subtitle:titleView.subtitleLabel.text titleImageData:nil];
229
+        [helper setup:self.navigatorStyle];
220
     }
230
     }
221
-    else
222
-    {
223
-        [viewController.navigationController.navigationBar setTitleTextAttributes:nil];
231
+
232
+    NSMutableDictionary *navButtonTextAttributes = [RCTHelpers textAttributesFromDictionary:self.navigatorStyle withPrefix:@"navBarButton"];
233
+
234
+    if (navButtonTextAttributes.allKeys.count > 0) {
235
+        
236
+        for (UIBarButtonItem *item in viewController.navigationItem.leftBarButtonItems) {
237
+            [item setTitleTextAttributes:navButtonTextAttributes forState:UIControlStateNormal];
238
+        }
239
+        
240
+        for (UIBarButtonItem *item in viewController.navigationItem.rightBarButtonItems) {
241
+            [item setTitleTextAttributes:navButtonTextAttributes forState:UIControlStateNormal];
242
+        }
243
+
244
+        // At the moment, this seems to be the only thing that gets the back button correctly
245
+        [navButtonTextAttributes removeObjectForKey:NSForegroundColorAttributeName];
246
+        [[UIBarButtonItem appearance] setTitleTextAttributes:navButtonTextAttributes forState:UIControlStateNormal];
247
+        //        [viewController.navigationItem.backBarButtonItem setTitleTextAttributes:navButtonTextAttributes forState:UIControlStateNormal];
224
     }
248
     }
225
-    
249
+
226
     NSString *navBarButtonColor = self.navigatorStyle[@"navBarButtonColor"];
250
     NSString *navBarButtonColor = self.navigatorStyle[@"navBarButtonColor"];
227
-    if (navBarButtonColor)
228
-    {
251
+    if (navBarButtonColor) {
252
+    
229
         UIColor *color = navBarButtonColor != (id)[NSNull null] ? [RCTConvert UIColor:navBarButtonColor] : nil;
253
         UIColor *color = navBarButtonColor != (id)[NSNull null] ? [RCTConvert UIColor:navBarButtonColor] : nil;
230
         viewController.navigationController.navigationBar.tintColor = color;
254
         viewController.navigationController.navigationBar.tintColor = color;
231
-    }
232
-    else
255
+        
256
+    } else
233
     {
257
     {
234
         viewController.navigationController.navigationBar.tintColor = nil;
258
         viewController.navigationController.navigationBar.tintColor = nil;
235
     }
259
     }
236
   
260
   
237
-    NSString *statusBarTextColorSchemeSingleScreen = self.navigatorStyle[@"statusBarTextColorSchemeSingleScreen"];
238
-    if (statusBarTextColorSchemeSingleScreen && [statusBarTextColorSchemeSingleScreen isEqualToString:@"light"])
239
-    {
240
-      self._statusBarTextColorSchemeLight = YES;
241
-    }
242
-    else
243
-    {
244
-      self._statusBarTextColorSchemeLight = NO;
261
+    BOOL viewControllerBasedStatusBar = false;
262
+
263
+    NSObject *viewControllerBasedStatusBarAppearance = [[NSBundle mainBundle] infoDictionary][@"UIViewControllerBasedStatusBarAppearance"];
264
+    if (viewControllerBasedStatusBarAppearance && [viewControllerBasedStatusBarAppearance isKindOfClass:[NSNumber class]]) {
265
+      viewControllerBasedStatusBar = [(NSNumber *)viewControllerBasedStatusBarAppearance boolValue];
245
     }
266
     }
246
   
267
   
247
-    // incase statusBarTextColorSchemeSingleScreen exists ignore the statusBarTextColorScheme which more globaly
248
-    if (!statusBarTextColorSchemeSingleScreen) {
249
-      NSString *statusBarTextColorScheme = self.navigatorStyle[@"statusBarTextColorScheme"];
250
-      if (statusBarTextColorScheme && [statusBarTextColorScheme isEqualToString:@"light"] && !statusBarTextColorSchemeSingleScreen)
251
-      {
252
-          viewController.navigationController.navigationBar.barStyle = UIBarStyleBlack;
253
-          self._statusBarTextColorSchemeLight = YES;
268
+    NSString *statusBarTextColorSchemeSingleScreen = self.navigatorStyle[@"statusBarTextColorSchemeSingleScreen"];
269
+    NSString *statusBarTextColorScheme = self.navigatorStyle[@"statusBarTextColorScheme"];
270
+    NSString *finalColorScheme = statusBarTextColorSchemeSingleScreen ? : statusBarTextColorScheme;
271
+
272
+    if (finalColorScheme && [finalColorScheme isEqualToString:@"light"]) {
273
+        
274
+        if (!statusBarTextColorSchemeSingleScreen) {
275
+              viewController.navigationController.navigationBar.barStyle = UIBarStyleBlack;
276
+        }
277
+      
278
+        self._statusBarTextColorSchemeLight = true;
279
+        if (!viewControllerBasedStatusBarAppearance) {
280
+            [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
281
+        }
282
+      
283
+        [viewController setNeedsStatusBarAppearanceUpdate];
284
+        
285
+    } else {
254
         
286
         
255
-      }
256
-      else
257
-      {
258
-          viewController.navigationController.navigationBar.barStyle = UIBarStyleDefault;
259
-          self._statusBarTextColorSchemeLight = NO;
260
-      }
287
+        if (!statusBarTextColorSchemeSingleScreen) {
288
+              viewController.navigationController.navigationBar.barStyle = UIBarStyleDefault;
289
+        }
290
+      
291
+        self._statusBarTextColorSchemeLight = false;
292
+      
293
+        if (!viewControllerBasedStatusBarAppearance) {
294
+            [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
295
+        }
296
+        [viewController setNeedsStatusBarAppearanceUpdate];
261
     }
297
     }
262
   
298
   
263
     NSNumber *navBarHidden = self.navigatorStyle[@"navBarHidden"];
299
     NSNumber *navBarHidden = self.navigatorStyle[@"navBarHidden"];
264
     BOOL navBarHiddenBool = navBarHidden ? [navBarHidden boolValue] : NO;
300
     BOOL navBarHiddenBool = navBarHidden ? [navBarHidden boolValue] : NO;
265
-    if (viewController.navigationController.navigationBarHidden != navBarHiddenBool)
266
-    {
301
+    if (viewController.navigationController.navigationBarHidden != navBarHiddenBool) {
267
         [viewController.navigationController setNavigationBarHidden:navBarHiddenBool animated:YES];
302
         [viewController.navigationController setNavigationBarHidden:navBarHiddenBool animated:YES];
268
     }
303
     }
269
-    
304
+
270
     NSNumber *navBarHideOnScroll = self.navigatorStyle[@"navBarHideOnScroll"];
305
     NSNumber *navBarHideOnScroll = self.navigatorStyle[@"navBarHideOnScroll"];
271
     BOOL navBarHideOnScrollBool = navBarHideOnScroll ? [navBarHideOnScroll boolValue] : NO;
306
     BOOL navBarHideOnScrollBool = navBarHideOnScroll ? [navBarHideOnScroll boolValue] : NO;
272
-    if (navBarHideOnScrollBool)
273
-    {
307
+    if (navBarHideOnScrollBool) {
274
         viewController.navigationController.hidesBarsOnSwipe = YES;
308
         viewController.navigationController.hidesBarsOnSwipe = YES;
275
-    }
276
-    else
277
-    {
309
+    } else {
278
         viewController.navigationController.hidesBarsOnSwipe = NO;
310
         viewController.navigationController.hidesBarsOnSwipe = NO;
279
     }
311
     }
280
-    
312
+
281
     NSNumber *statusBarBlur = self.navigatorStyle[@"statusBarBlur"];
313
     NSNumber *statusBarBlur = self.navigatorStyle[@"statusBarBlur"];
282
     BOOL statusBarBlurBool = statusBarBlur ? [statusBarBlur boolValue] : NO;
314
     BOOL statusBarBlurBool = statusBarBlur ? [statusBarBlur boolValue] : NO;
283
-    if (statusBarBlurBool)
284
-    {
285
-        if (![viewController.view viewWithTag:BLUR_STATUS_TAG])
286
-        {
287
-            UIVisualEffectView *blur = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
288
-            blur.frame = [[UIApplication sharedApplication] statusBarFrame];
289
-            blur.tag = BLUR_STATUS_TAG;
290
-            [viewController.view addSubview:blur];
291
-        }
315
+    if (statusBarBlurBool && ![viewController.view viewWithTag:BLUR_STATUS_TAG]) {
316
+        
317
+        UIVisualEffectView *blur = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
318
+        blur.frame = [[UIApplication sharedApplication] statusBarFrame];
319
+        blur.tag = BLUR_STATUS_TAG;
320
+        [viewController.view insertSubview:blur atIndex:0];
292
     }
321
     }
293
-    
322
+
294
     NSNumber *navBarBlur = self.navigatorStyle[@"navBarBlur"];
323
     NSNumber *navBarBlur = self.navigatorStyle[@"navBarBlur"];
295
     BOOL navBarBlurBool = navBarBlur ? [navBarBlur boolValue] : NO;
324
     BOOL navBarBlurBool = navBarBlur ? [navBarBlur boolValue] : NO;
296
-    if (navBarBlurBool)
297
-    {
298
-        if (![viewController.navigationController.navigationBar viewWithTag:BLUR_NAVBAR_TAG])
299
-        {
325
+    if (navBarBlurBool) {
326
+        
327
+        if (![viewController.navigationController.navigationBar viewWithTag:BLUR_NAVBAR_TAG]) {
300
             [self storeOriginalNavBarImages];
328
             [self storeOriginalNavBarImages];
301
-            
302
-            [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
303
-            self.navigationController.navigationBar.shadowImage = [UIImage new];
329
+
330
+            [viewController.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
331
+            viewController.navigationController.navigationBar.shadowImage = [UIImage new];
304
             UIVisualEffectView *blur = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
332
             UIVisualEffectView *blur = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
305
             CGRect statusBarFrame = [[UIApplication sharedApplication] statusBarFrame];
333
             CGRect statusBarFrame = [[UIApplication sharedApplication] statusBarFrame];
306
-            blur.frame = CGRectMake(0, -1 * statusBarFrame.size.height, self.navigationController.navigationBar.frame.size.width, self.navigationController.navigationBar.frame.size.height + statusBarFrame.size.height);
334
+            blur.frame = CGRectMake(0, -1 * statusBarFrame.size.height, viewController.navigationController.navigationBar.frame.size.width, viewController.navigationController.navigationBar.frame.size.height + statusBarFrame.size.height);
307
             blur.userInteractionEnabled = NO;
335
             blur.userInteractionEnabled = NO;
308
             blur.tag = BLUR_NAVBAR_TAG;
336
             blur.tag = BLUR_NAVBAR_TAG;
309
-            [self.navigationController.navigationBar insertSubview:blur atIndex:0];
337
+            [viewController.navigationController.navigationBar insertSubview:blur atIndex:0];
338
+            [viewController.navigationController.navigationBar sendSubviewToBack:blur];
310
         }
339
         }
311
-    }
312
-    else
313
-    {
340
+        
341
+    } else {
342
+        
314
         UIView *blur = [viewController.navigationController.navigationBar viewWithTag:BLUR_NAVBAR_TAG];
343
         UIView *blur = [viewController.navigationController.navigationBar viewWithTag:BLUR_NAVBAR_TAG];
315
-        if (blur)
316
-        {
344
+        if (blur) {
317
             [blur removeFromSuperview];
345
             [blur removeFromSuperview];
318
             [viewController.navigationController.navigationBar setBackgroundImage:self.originalNavBarImages[@"bgImage"] forBarMetrics:UIBarMetricsDefault];
346
             [viewController.navigationController.navigationBar setBackgroundImage:self.originalNavBarImages[@"bgImage"] forBarMetrics:UIBarMetricsDefault];
319
             viewController.navigationController.navigationBar.shadowImage = self.originalNavBarImages[@"shadowImage"];
347
             viewController.navigationController.navigationBar.shadowImage = self.originalNavBarImages[@"shadowImage"];
320
             self.originalNavBarImages = nil;
348
             self.originalNavBarImages = nil;
321
         }
349
         }
322
     }
350
     }
323
-    
351
+
324
     NSNumber *navBarTransparent = self.navigatorStyle[@"navBarTransparent"];
352
     NSNumber *navBarTransparent = self.navigatorStyle[@"navBarTransparent"];
325
     BOOL navBarTransparentBool = navBarTransparent ? [navBarTransparent boolValue] : NO;
353
     BOOL navBarTransparentBool = navBarTransparent ? [navBarTransparent boolValue] : NO;
326
     
354
     
362
             backgroundView.alpha = originalAlpha;
390
             backgroundView.alpha = originalAlpha;
363
         }];
391
         }];
364
     }
392
     }
365
-    
393
+
394
+    NSNumber *autoAdjustsScrollViewInsets = self.navigatorStyle[@"autoAdjustScrollViewInsets"];
395
+    viewController.automaticallyAdjustsScrollViewInsets = autoAdjustsScrollViewInsets ? [autoAdjustsScrollViewInsets boolValue] : false;
396
+
366
     NSNumber *navBarTranslucent = self.navigatorStyle[@"navBarTranslucent"];
397
     NSNumber *navBarTranslucent = self.navigatorStyle[@"navBarTranslucent"];
367
     BOOL navBarTranslucentBool = navBarTranslucent ? [navBarTranslucent boolValue] : NO;
398
     BOOL navBarTranslucentBool = navBarTranslucent ? [navBarTranslucent boolValue] : NO;
368
-    if (navBarTranslucentBool || navBarBlurBool)
369
-    {
399
+    if (navBarTranslucentBool || navBarBlurBool) {
370
         viewController.navigationController.navigationBar.translucent = YES;
400
         viewController.navigationController.navigationBar.translucent = YES;
371
-    }
372
-    else
373
-    {
401
+    } else {
374
         viewController.navigationController.navigationBar.translucent = NO;
402
         viewController.navigationController.navigationBar.translucent = NO;
375
     }
403
     }
376
-    
404
+
405
+    NSNumber *extendedLayoutIncludesOpaqueBars = self.navigatorStyle[@"extendedLayoutIncludesOpaqueBars"];
406
+    BOOL extendedLayoutIncludesOpaqueBarsBool = extendedLayoutIncludesOpaqueBars ? [extendedLayoutIncludesOpaqueBars boolValue] : NO;
407
+    viewController.extendedLayoutIncludesOpaqueBars = extendedLayoutIncludesOpaqueBarsBool;
408
+
377
     NSNumber *drawUnderNavBar = self.navigatorStyle[@"drawUnderNavBar"];
409
     NSNumber *drawUnderNavBar = self.navigatorStyle[@"drawUnderNavBar"];
378
     BOOL drawUnderNavBarBool = drawUnderNavBar ? [drawUnderNavBar boolValue] : NO;
410
     BOOL drawUnderNavBarBool = drawUnderNavBar ? [drawUnderNavBar boolValue] : NO;
379
-    if (drawUnderNavBarBool)
380
-    {
411
+    if (drawUnderNavBarBool) {
381
         viewController.edgesForExtendedLayout |= UIRectEdgeTop;
412
         viewController.edgesForExtendedLayout |= UIRectEdgeTop;
382
     }
413
     }
383
-    else
384
-    {
414
+    else {
385
         viewController.edgesForExtendedLayout &= ~UIRectEdgeTop;
415
         viewController.edgesForExtendedLayout &= ~UIRectEdgeTop;
386
     }
416
     }
387
-    
417
+
388
     NSNumber *drawUnderTabBar = self.navigatorStyle[@"drawUnderTabBar"];
418
     NSNumber *drawUnderTabBar = self.navigatorStyle[@"drawUnderTabBar"];
389
     BOOL drawUnderTabBarBool = drawUnderTabBar ? [drawUnderTabBar boolValue] : NO;
419
     BOOL drawUnderTabBarBool = drawUnderTabBar ? [drawUnderTabBar boolValue] : NO;
390
-    if (drawUnderTabBarBool)
391
-    {
420
+    if (drawUnderTabBarBool) {
392
         viewController.edgesForExtendedLayout |= UIRectEdgeBottom;
421
         viewController.edgesForExtendedLayout |= UIRectEdgeBottom;
393
-    }
394
-    else
395
-    {
422
+    } else {
396
         viewController.edgesForExtendedLayout &= ~UIRectEdgeBottom;
423
         viewController.edgesForExtendedLayout &= ~UIRectEdgeBottom;
397
     }
424
     }
398
-    
425
+
399
     NSNumber *removeNavBarBorder = self.navigatorStyle[@"navBarNoBorder"];
426
     NSNumber *removeNavBarBorder = self.navigatorStyle[@"navBarNoBorder"];
400
     BOOL removeNavBarBorderBool = removeNavBarBorder ? [removeNavBarBorder boolValue] : NO;
427
     BOOL removeNavBarBorderBool = removeNavBarBorder ? [removeNavBarBorder boolValue] : NO;
401
-    if(removeNavBarBorderBool)
402
-    {
428
+    if (removeNavBarBorderBool) {
403
         self.navBarHairlineImageView.hidden = YES;
429
         self.navBarHairlineImageView.hidden = YES;
404
-    }
405
-    else
406
-    {
430
+    } else {
407
         self.navBarHairlineImageView.hidden = NO;
431
         self.navBarHairlineImageView.hidden = NO;
408
     }
432
     }
409
     
433
     
422
 }
446
 }
423
 
447
 
424
 -(void)storeOriginalNavBarImages {
448
 -(void)storeOriginalNavBarImages {
449
+    
425
     NSMutableDictionary *originalNavBarImages = [@{} mutableCopy];
450
     NSMutableDictionary *originalNavBarImages = [@{} mutableCopy];
426
     UIImage *bgImage = [self.navigationController.navigationBar backgroundImageForBarMetrics:UIBarMetricsDefault];
451
     UIImage *bgImage = [self.navigationController.navigationBar backgroundImageForBarMetrics:UIBarMetricsDefault];
427
-    if (bgImage != nil)
428
-    {
452
+    if (bgImage != nil) {
429
         originalNavBarImages[@"bgImage"] = bgImage;
453
         originalNavBarImages[@"bgImage"] = bgImage;
430
     }
454
     }
431
     UIImage *shadowImage = self.navigationController.navigationBar.shadowImage;
455
     UIImage *shadowImage = self.navigationController.navigationBar.shadowImage;
432
-    if (shadowImage != nil)
433
-    {
456
+    if (shadowImage != nil) {
434
         originalNavBarImages[@"shadowImage"] = shadowImage;
457
         originalNavBarImages[@"shadowImage"] = shadowImage;
435
     }
458
     }
436
     self.originalNavBarImages = originalNavBarImages;
459
     self.originalNavBarImages = originalNavBarImages;
453
 {
476
 {
454
     NSNumber *tabBarHidden = self.navigatorStyle[@"tabBarHidden"];
477
     NSNumber *tabBarHidden = self.navigatorStyle[@"tabBarHidden"];
455
     BOOL tabBarHiddenBool = tabBarHidden ? [tabBarHidden boolValue] : NO;
478
     BOOL tabBarHiddenBool = tabBarHidden ? [tabBarHidden boolValue] : NO;
456
-    if (tabBarHiddenBool)
457
-    {
479
+    if (tabBarHiddenBool) {
458
         self._hidesBottomBarWhenPushed = YES;
480
         self._hidesBottomBarWhenPushed = YES;
459
-    }
460
-    else
461
-    {
481
+    } else {
462
         self._hidesBottomBarWhenPushed = NO;
482
         self._hidesBottomBarWhenPushed = NO;
463
     }
483
     }
464
     
484
     
465
     NSNumber *statusBarHideWithNavBar = self.navigatorStyle[@"statusBarHideWithNavBar"];
485
     NSNumber *statusBarHideWithNavBar = self.navigatorStyle[@"statusBarHideWithNavBar"];
466
     BOOL statusBarHideWithNavBarBool = statusBarHideWithNavBar ? [statusBarHideWithNavBar boolValue] : NO;
486
     BOOL statusBarHideWithNavBarBool = statusBarHideWithNavBar ? [statusBarHideWithNavBar boolValue] : NO;
467
-    if (statusBarHideWithNavBarBool)
468
-    {
487
+    if (statusBarHideWithNavBarBool) {
469
         self._statusBarHideWithNavBar = YES;
488
         self._statusBarHideWithNavBar = YES;
470
-    }
471
-    else
472
-    {
489
+    } else {
473
         self._statusBarHideWithNavBar = NO;
490
         self._statusBarHideWithNavBar = NO;
474
     }
491
     }
475
     
492
     
476
     NSNumber *statusBarHidden = self.navigatorStyle[@"statusBarHidden"];
493
     NSNumber *statusBarHidden = self.navigatorStyle[@"statusBarHidden"];
477
     BOOL statusBarHiddenBool = statusBarHidden ? [statusBarHidden boolValue] : NO;
494
     BOOL statusBarHiddenBool = statusBarHidden ? [statusBarHidden boolValue] : NO;
478
-    if (statusBarHiddenBool)
479
-    {
495
+    if (statusBarHiddenBool) {
480
         self._statusBarHidden = YES;
496
         self._statusBarHidden = YES;
481
-    }
482
-    else
483
-    {
497
+    } else {
484
         self._statusBarHidden = NO;
498
         self._statusBarHidden = NO;
485
     }
499
     }
486
 }
500
 }
493
 
507
 
494
 - (BOOL)prefersStatusBarHidden
508
 - (BOOL)prefersStatusBarHidden
495
 {
509
 {
496
-    if (self._statusBarHidden)
497
-    {
510
+    if (self._statusBarHidden) {
498
         return YES;
511
         return YES;
499
     }
512
     }
500
-    if (self._statusBarHideWithNavBar)
501
-    {
513
+    
514
+    if (self._statusBarHideWithNavBar) {
502
         return self.navigationController.isNavigationBarHidden;
515
         return self.navigationController.isNavigationBarHidden;
503
-    }
504
-    else
505
-    {
516
+    } else {
506
         return NO;
517
         return NO;
507
     }
518
     }
508
 }
519
 }
514
 
525
 
515
 - (UIStatusBarStyle)preferredStatusBarStyle
526
 - (UIStatusBarStyle)preferredStatusBarStyle
516
 {
527
 {
517
-    if (self._statusBarTextColorSchemeLight)
518
-    {
528
+    if (self._statusBarTextColorSchemeLight){
519
         return UIStatusBarStyleLightContent;
529
         return UIStatusBarStyleLightContent;
520
-    }
521
-    else
522
-    {
530
+    } else {
523
         return UIStatusBarStyleDefault;
531
         return UIStatusBarStyleDefault;
524
     }
532
     }
525
 }
533
 }

+ 8
- 0
src/Screen.js ファイルの表示

84
     return platformSpecific.navigatorSetTitleImage(this, params);
84
     return platformSpecific.navigatorSetTitleImage(this, params);
85
   }
85
   }
86
 
86
 
87
+  setStyle(params = {}) {
88
+    if (Platform.OS === 'ios') {
89
+      return platformSpecific.navigatorSetStyle(this, params);
90
+    } else {
91
+      console.log(`Setting style isn\'t supported on ${Platform.OS} yet`);
92
+    }
93
+  }
94
+
87
   toggleDrawer(params = {}) {
95
   toggleDrawer(params = {}) {
88
     return platformSpecific.navigatorToggleDrawer(this, params);
96
     return platformSpecific.navigatorToggleDrawer(this, params);
89
   }
97
   }

+ 5
- 0
src/deprecated/controllers/index.js ファイルの表示

171
         }
171
         }
172
         RCCManager.NavigationControllerIOS(id, "setTitle", params);
172
         RCCManager.NavigationControllerIOS(id, "setTitle", params);
173
       },
173
       },
174
+      setStyle: function (params) {
175
+        style = Object.assign({}, params);
176
+        _processProperties(style);
177
+        RCCManager.NavigationControllerIOS(id, "setStyle", style);
178
+      },
174
       resetTo: function (params) {
179
       resetTo: function (params) {
175
         var unsubscribes = [];
180
         var unsubscribes = [];
176
         if (params['style']) {
181
         if (params['style']) {

+ 6
- 0
src/deprecated/platformSpecificDeprecated.ios.js ファイルの表示

74
                   <NavigationControllerIOS
74
                   <NavigationControllerIOS
75
                     id={tab.navigationParams.navigatorID}
75
                     id={tab.navigationParams.navigatorID}
76
                     title={tab.title}
76
                     title={tab.title}
77
+                    subtitle={tab.subtitle}
77
                     titleImage={tab.titleImage}
78
                     titleImage={tab.titleImage}
78
                     component={tab.screen}
79
                     component={tab.screen}
79
                     passProps={{
80
                     passProps={{
318
   });
319
   });
319
 }
320
 }
320
 
321
 
322
+function navigatorSetStyle(navigator, params) {
323
+  Controllers.NavigationControllerIOS(navigator.navigatorID).setStyle(params)
324
+}
325
+
321
 function navigatorToggleDrawer(navigator, params) {
326
 function navigatorToggleDrawer(navigator, params) {
322
   const controllerID = navigator.navigatorID.split('_')[0];
327
   const controllerID = navigator.navigatorID.split('_')[0];
323
   if (params.to == 'open') {
328
   if (params.to == 'open') {
585
   dismissInAppNotification,
590
   dismissInAppNotification,
586
   navigatorSetButtons,
591
   navigatorSetButtons,
587
   navigatorSetTitle,
592
   navigatorSetTitle,
593
+  navigatorSetStyle,
588
   navigatorSetTitleImage,
594
   navigatorSetTitleImage,
589
   navigatorToggleDrawer,
595
   navigatorToggleDrawer,
590
   navigatorToggleTabs,
596
   navigatorToggleTabs,