hybrid-navigation 2.7.5 → 2.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/android/build.gradle +1 -1
  3. package/ios/HybridNavigation/Bridge/HBDEventEmitter.h +16 -16
  4. package/ios/HybridNavigation/Bridge/HBDEventEmitter.m +33 -33
  5. package/ios/HybridNavigation/Bridge/HBDGardenModule.m +43 -25
  6. package/ios/HybridNavigation/Bridge/HBDNavigationModule.m +80 -54
  7. package/ios/HybridNavigation/Bridge/HBDReactBridgeManager.h +3 -3
  8. package/ios/HybridNavigation/Bridge/HBDReactBridgeManager.m +57 -61
  9. package/ios/HybridNavigation/GlobalStyle.h +7 -7
  10. package/ios/HybridNavigation/GlobalStyle.m +86 -86
  11. package/ios/HybridNavigation/HBDGarden.m +28 -28
  12. package/ios/HybridNavigation/HBDUtils.h +4 -4
  13. package/ios/HybridNavigation/HBDUtils.m +43 -49
  14. package/ios/HybridNavigation/Navigator/HBDDrawerNavigator.m +24 -24
  15. package/ios/HybridNavigation/Navigator/HBDNavigator.h +2 -2
  16. package/ios/HybridNavigation/Navigator/HBDNavigatorRegistry.h +4 -4
  17. package/ios/HybridNavigation/Navigator/HBDNavigatorRegistry.m +19 -20
  18. package/ios/HybridNavigation/Navigator/HBDScreenNavigator.m +24 -26
  19. package/ios/HybridNavigation/Navigator/HBDStackNavigator.m +29 -29
  20. package/ios/HybridNavigation/Navigator/HBDTabNavigator.m +54 -56
  21. package/ios/HybridNavigation/View/HBDBarButtonItem.h +1 -1
  22. package/ios/HybridNavigation/View/HBDBarButtonItem.m +5 -5
  23. package/ios/HybridNavigation/View/HBDNavigationBar.h +4 -4
  24. package/ios/HybridNavigation/View/HBDNavigationBar.m +19 -20
  25. package/ios/HybridNavigation/View/HBDReactTabBar.m +3 -3
  26. package/ios/HybridNavigation/View/HBDRootView.m +3 -3
  27. package/ios/HybridNavigation/View/HBDTitleView.m +7 -7
  28. package/ios/HybridNavigation/View/UITabBar+Badge.h +1 -0
  29. package/ios/HybridNavigation/View/UITabBar+Badge.m +6 -6
  30. package/ios/HybridNavigation/ViewController/HBDDrawerController.h +8 -5
  31. package/ios/HybridNavigation/ViewController/HBDDrawerController.m +39 -38
  32. package/ios/HybridNavigation/ViewController/HBDModalViewController.h +2 -2
  33. package/ios/HybridNavigation/ViewController/HBDModalViewController.m +45 -44
  34. package/ios/HybridNavigation/ViewController/HBDNavigationController.h +1 -1
  35. package/ios/HybridNavigation/ViewController/HBDNavigationController.m +111 -113
  36. package/ios/HybridNavigation/ViewController/HBDPopAnimation.m +4 -4
  37. package/ios/HybridNavigation/ViewController/HBDPushAnimation.m +4 -4
  38. package/ios/HybridNavigation/ViewController/HBDReactViewController.m +24 -26
  39. package/ios/HybridNavigation/ViewController/HBDTabBarController.h +1 -1
  40. package/ios/HybridNavigation/ViewController/HBDTabBarController.m +23 -25
  41. package/ios/HybridNavigation/ViewController/HBDViewController.m +31 -32
  42. package/ios/HybridNavigation/ViewController/UINavigationController+HBD.m +3 -3
  43. package/ios/HybridNavigation/ViewController/UIViewController+HBD.h +20 -19
  44. package/ios/HybridNavigation/ViewController/UIViewController+HBD.m +35 -36
  45. package/lib/DeepLink.js +5 -5
  46. package/lib/hooks.d.ts +1 -1
  47. package/lib/hooks.js +4 -7
  48. package/package.json +1 -1
@@ -11,10 +11,8 @@
11
11
  #import "HBDTitleView.h"
12
12
  #import "HBDRootView.h"
13
13
  #import "HBDEventEmitter.h"
14
- #import "HBDUtils.h"
15
14
 
16
15
  #import <React/RCTConvert.h>
17
- #import <React/RCTLog.h>
18
16
 
19
17
  @interface HBDReactViewController ()
20
18
 
@@ -80,7 +78,7 @@
80
78
  } else {
81
79
  props = [@{} mutableCopy];
82
80
  }
83
- [props setObject:self.sceneId forKey:@"sceneId"];
81
+ props[@"sceneId"] = self.sceneId;
84
82
  return props;
85
83
  }
86
84
 
@@ -94,15 +92,15 @@
94
92
  - (void)viewWillAppear:(BOOL)animated {
95
93
  [super viewWillAppear:animated];
96
94
  self.automaticallyAdjustsScrollViewInsets = NO;
97
- id<UIViewControllerTransitionCoordinator> coordinator = self.transitionCoordinator;
95
+ id <UIViewControllerTransitionCoordinator> coordinator = self.transitionCoordinator;
98
96
  if (coordinator && !coordinator.interactive) {
99
97
  if (!self.viewAppeared) {
100
98
  self.viewAppeared = YES;
101
99
  if (self.firstRenderCompleted) {
102
100
  [HBDEventEmitter sendEvent:EVENT_NAVIGATION data:@{
103
- KEY_SCENE_ID: self.sceneId,
104
- KEY_ON: ON_COMPONENT_APPEAR
105
- }];
101
+ KEY_SCENE_ID: self.sceneId,
102
+ KEY_ON: ON_COMPONENT_APPEAR
103
+ }];
106
104
  }
107
105
  }
108
106
  }
@@ -114,24 +112,24 @@
114
112
  self.viewAppeared = YES;
115
113
  if (self.firstRenderCompleted) {
116
114
  [HBDEventEmitter sendEvent:EVENT_NAVIGATION data:@{
117
- KEY_SCENE_ID: self.sceneId,
118
- KEY_ON: ON_COMPONENT_APPEAR
119
- }];
115
+ KEY_SCENE_ID: self.sceneId,
116
+ KEY_ON: ON_COMPONENT_APPEAR
117
+ }];
120
118
  }
121
119
  }
122
120
  }
123
121
 
124
122
  - (void)viewWillDisappear:(BOOL)animated {
125
123
  [super viewWillDisappear:animated];
126
- id<UIViewControllerTransitionCoordinator> coordinator = self.transitionCoordinator;
124
+ id <UIViewControllerTransitionCoordinator> coordinator = self.transitionCoordinator;
127
125
  if (coordinator && !coordinator.interactive) {
128
126
  if (self.viewAppeared) {
129
127
  self.viewAppeared = NO;
130
128
  if (self.firstRenderCompleted) {
131
129
  [HBDEventEmitter sendEvent:EVENT_NAVIGATION data:@{
132
- KEY_SCENE_ID: self.sceneId,
133
- KEY_ON: ON_COMPONENT_DISAPPEAR
134
- }];
130
+ KEY_SCENE_ID: self.sceneId,
131
+ KEY_ON: ON_COMPONENT_DISAPPEAR
132
+ }];
135
133
  }
136
134
  }
137
135
  }
@@ -143,9 +141,9 @@
143
141
  self.viewAppeared = NO;
144
142
  if (self.firstRenderCompleted) {
145
143
  [HBDEventEmitter sendEvent:EVENT_NAVIGATION data:@{
146
- KEY_SCENE_ID: self.sceneId,
147
- KEY_ON: ON_COMPONENT_DISAPPEAR
148
- }];
144
+ KEY_SCENE_ID: self.sceneId,
145
+ KEY_ON: ON_COMPONENT_DISAPPEAR
146
+ }];
149
147
  }
150
148
  }
151
149
  }
@@ -157,21 +155,21 @@
157
155
  self.firstRenderCompleted = YES;
158
156
  if (self.viewAppeared) {
159
157
  [HBDEventEmitter sendEvent:EVENT_NAVIGATION data:@{
160
- KEY_SCENE_ID: self.sceneId,
161
- KEY_ON: ON_COMPONENT_APPEAR
162
- }];
158
+ KEY_SCENE_ID: self.sceneId,
159
+ KEY_ON: ON_COMPONENT_APPEAR
160
+ }];
163
161
  }
164
162
  }
165
163
 
166
164
  - (void)didReceiveResultCode:(NSInteger)resultCode resultData:(NSDictionary *)data requestCode:(NSInteger)requestCode {
167
165
  [super didReceiveResultCode:resultCode resultData:data requestCode:requestCode];
168
166
  [HBDEventEmitter sendEvent:EVENT_NAVIGATION data:@{
169
- KEY_ON: ON_COMPONENT_RESULT,
170
- KEY_REQUEST_CODE: @(requestCode),
171
- KEY_RESULT_CODE: @(resultCode),
172
- KEY_RESULT_DATA: RCTNullIfNil(data),
173
- KEY_SCENE_ID: self.sceneId,
174
- }];
167
+ KEY_ON: ON_COMPONENT_RESULT,
168
+ KEY_REQUEST_CODE: @(requestCode),
169
+ KEY_RESULT_CODE: @(resultCode),
170
+ KEY_RESULT_DATA: RCTNullIfNil(data),
171
+ KEY_SCENE_ID: self.sceneId,
172
+ }];
175
173
  }
176
174
 
177
175
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  @interface HBDTabBarController : UITabBarController
12
12
 
13
- @property (nonatomic, assign) BOOL intercepted;
13
+ @property(nonatomic, assign) BOOL intercepted;
14
14
 
15
15
  - (instancetype)initWithTabBarOptions:(NSDictionary *)options;
16
16
 
@@ -10,12 +10,10 @@
10
10
  #import "HBDReactViewController.h"
11
11
  #import "HBDReactBridgeManager.h"
12
12
  #import "HBDUtils.h"
13
- #import "UITabBar+Badge.h"
14
13
  #import "HBDEventEmitter.h"
15
14
  #import "HBDReactTabBar.h"
16
15
  #import "HBDRootView.h"
17
16
 
18
- #import <React/RCTRootView.h>
19
17
  #import <React/RCTRootViewDelegate.h>
20
18
  #import <React/RCTLog.h>
21
19
 
@@ -68,7 +66,7 @@
68
66
  props[@"selectedIndex"] = self.tabBarOptions[@"selectedIndex"];
69
67
  RCTRootView *rootView = [[HBDRootView alloc] initWithBridge:[HBDReactBridgeManager get].bridge moduleName:moduleName initialProperties:props];
70
68
  rootView.backgroundColor = UIColor.clearColor;
71
-
69
+
72
70
  BOOL sizeIndeterminate = [self.tabBarOptions[@"sizeIndeterminate"] boolValue];
73
71
  if (sizeIndeterminate) {
74
72
  rootView.delegate = self;
@@ -95,7 +93,7 @@
95
93
  props[@"tabs"] = options[@"tabs"];
96
94
  props[@"selectedIndex"] = @(self.selectedIndex);
97
95
  props[@"badgeColor"] = options[@"badgeColor"];
98
-
96
+
99
97
  NSString *tabBarItemColor = options[@"tabBarItemColor"];
100
98
  NSString *tabBarUnselectedItemColor = options[@"tabBarUnselectedItemColor"];
101
99
  if (tabBarItemColor) {
@@ -107,7 +105,7 @@
107
105
 
108
106
  - (void)removeTabBarAboriginal {
109
107
  NSUInteger count = self.tabBar.subviews.count;
110
- for (NSInteger i = count -1; i > -1; i --) {
108
+ for (NSInteger i = count - 1; i > -1; i--) {
111
109
  UIView *view = self.tabBar.subviews[i];
112
110
  NSString *viewName = [[[view classForCoder] description] stringByReplacingOccurrencesOfString:@"_" withString:@""];
113
111
  if ([viewName isEqualToString:@"UITabBarButton"]) {
@@ -122,17 +120,17 @@
122
120
  if (self.hasCustomTabBar) {
123
121
  [self updateCustomTabItem:option atIndex:index];
124
122
  } else {
125
- UIViewController *tab = [self.viewControllers objectAtIndex:index];
123
+ UIViewController *tab = self.viewControllers[index];
126
124
  [tab hbd_updateTabBarItem:option];
127
125
  }
128
126
  }
129
-
127
+
130
128
  if (self.hasCustomTabBar) {
131
129
  self.rootView.appProperties = [self props];
132
130
  }
133
131
  }
134
132
 
135
- - (NSMutableDictionary *)tabAtIndex:(NSInteger)index {
133
+ - (NSMutableDictionary *)tabAtIndex:(NSUInteger)index {
136
134
  NSMutableDictionary *options = [self.tabBarOptions mutableCopy];
137
135
  NSMutableArray *tabs = [options[@"tabs"] mutableCopy];
138
136
  options[@"tabs"] = tabs;
@@ -144,31 +142,31 @@
144
142
 
145
143
  - (void)updateCustomTabItem:(NSDictionary *)option atIndex:(NSUInteger)index {
146
144
  NSMutableDictionary *tab = [self tabAtIndex:index];
147
-
145
+
148
146
  // title
149
147
  NSString *title = option[@"title"];
150
148
  if (title != nil) {
151
149
  tab[@"title"] = title;
152
150
  }
153
-
151
+
154
152
  // icon title
155
153
  NSDictionary *icon = option[@"icon"];
156
154
  if (icon != nil) {
157
155
  NSDictionary *selected = icon[@"selected"];
158
156
  tab[@"icon"] = [HBDUtils iconUriFromUri:selected[@"uri"]];
159
-
157
+
160
158
  NSDictionary *unselected = icon[@"unselected"];
161
159
  if (unselected != nil) {
162
160
  tab[@"unselectedIcon"] = RCTNullIfNil([HBDUtils iconUriFromUri:unselected[@"uri"]]);
163
161
  }
164
162
  }
165
-
163
+
166
164
  // badge
167
165
  NSDictionary *badge = option[@"badge"];
168
166
  if (badge != nil) {
169
167
  BOOL hidden = badge[@"hidden"] ? [badge[@"hidden"] boolValue] : YES;
170
168
  NSString *text = hidden ? nil : (badge[@"text"] ? badge[@"text"] : nil);
171
- BOOL dot = hidden ? NO : (badge[@"dot"] ? [badge[@"dot"] boolValue] : NO);
169
+ BOOL dot = hidden ? NO : (badge[@"dot"] ? [badge[@"dot"] boolValue] : NO);
172
170
  tab[@"dot"] = @(dot);
173
171
  tab[@"badgeText"] = RCTNullIfNil(text);
174
172
  }
@@ -176,7 +174,7 @@
176
174
 
177
175
  - (void)updateTabBar:(NSDictionary *)options {
178
176
  UITabBar *tabBar = self.tabBar;
179
- NSString *tabBarColor = [options objectForKey:@"tabBarColor"];
177
+ NSString *tabBarColor = options[@"tabBarColor"];
180
178
  if (tabBarColor) {
181
179
  if (@available(iOS 15.0, *)) {
182
180
  [tabBar standardAppearance].backgroundImage = [HBDUtils imageWithColor:[HBDUtils colorWithHexString:tabBarColor]];
@@ -185,7 +183,7 @@
185
183
  [tabBar setBackgroundImage:[HBDUtils imageWithColor:[HBDUtils colorWithHexString:tabBarColor]]];
186
184
  }
187
185
  }
188
-
186
+
189
187
  NSDictionary *tabBarShadowImage = options[@"tabBarShadowImage"];
190
188
  if (RCTNilIfNull(tabBarShadowImage)) {
191
189
  UIImage *image = [UIImage new];
@@ -198,7 +196,7 @@
198
196
  }
199
197
  tabBar.shadowImage = image;
200
198
  }
201
-
199
+
202
200
  NSString *tabBarItemColor = options[@"tabBarItemColor"];
203
201
  NSString *tabBarUnselectedItemColor = options[@"tabBarUnselectedItemColor"];
204
202
  if (tabBarItemColor) {
@@ -221,12 +219,12 @@
221
219
  [super didReceiveResultCode:resultCode resultData:data requestCode:requestCode];
222
220
  if (self.hasCustomTabBar) {
223
221
  [HBDEventEmitter sendEvent:EVENT_NAVIGATION data:@{
224
- KEY_ON: ON_COMPONENT_RESULT,
225
- KEY_REQUEST_CODE: @(requestCode),
226
- KEY_RESULT_CODE: @(resultCode),
227
- KEY_RESULT_DATA: RCTNullIfNil(data),
228
- KEY_SCENE_ID: self.sceneId,
229
- }];
222
+ KEY_ON: ON_COMPONENT_RESULT,
223
+ KEY_REQUEST_CODE: @(requestCode),
224
+ KEY_RESULT_CODE: @(resultCode),
225
+ KEY_RESULT_DATA: RCTNullIfNil(data),
226
+ KEY_SCENE_ID: self.sceneId,
227
+ }];
230
228
  }
231
229
  }
232
230
 
@@ -249,10 +247,10 @@
249
247
  if ([[HBDReactBridgeManager get] hasRootLayout] && self.intercepted) {
250
248
  long from = self.selectedIndex;
251
249
  long to = [self.childViewControllers indexOfObject:viewController];
252
-
250
+
253
251
  [HBDEventEmitter sendEvent:EVENT_SWITCH_TAB data:@{
254
- KEY_SCENE_ID: self.sceneId,
255
- KEY_INDEX: [NSString stringWithFormat:@"%ld-%ld", from, to],
252
+ KEY_SCENE_ID: self.sceneId,
253
+ KEY_INDEX: [NSString stringWithFormat:@"%ld-%ld", from, to],
256
254
  }];
257
255
  return NO;
258
256
  }
@@ -8,7 +8,6 @@
8
8
 
9
9
  #import "HBDViewController.h"
10
10
  #import "HBDUtils.h"
11
- #import "HBDNavigationController.h"
12
11
  #import <React/RCTLog.h>
13
12
 
14
13
  @interface HBDViewController ()
@@ -38,7 +37,7 @@
38
37
  _options = options;
39
38
  _props = props;
40
39
  _garden = [[HBDGarden alloc] initWithViewController:self];
41
-
40
+
42
41
  [self applyNavigationBarOptions:options];
43
42
  [self applyTabBarOptions:options];
44
43
  }
@@ -57,7 +56,7 @@
57
56
  if (@available(iOS 13.0, *)) {
58
57
  return [self hbd_statusBarHidden] && ![HBDUtils isInCall];
59
58
  }
60
-
59
+
61
60
  if ([HBDUtils isIphoneX]) {
62
61
  return [self hbd_statusBarHidden] && ![HBDUtils isInCall];
63
62
  } else {
@@ -130,22 +129,22 @@
130
129
  self.hbd_barStyle = UIBarStyleBlack;
131
130
  }
132
131
  }
133
-
132
+
134
133
  NSString *topBarTintColor = options[@"topBarTintColor"];
135
134
  if (topBarTintColor) {
136
135
  self.hbd_tintColor = [HBDUtils colorWithHexString:topBarTintColor];
137
136
  }
138
-
137
+
139
138
  NSMutableDictionary *titleAttributes = [@{} mutableCopy];
140
- NSString *titleTextColor = [options objectForKey:@"titleTextColor"];
141
- NSNumber *titleTextSize = [options objectForKey:@"titleTextSize"];
139
+ NSString *titleTextColor = options[@"titleTextColor"];
140
+ NSNumber *titleTextSize = options[@"titleTextSize"];
142
141
  if (titleTextColor) {
143
- [titleAttributes setObject:[HBDUtils colorWithHexString:titleTextColor] forKey:NSForegroundColorAttributeName];
142
+ titleAttributes[NSForegroundColorAttributeName] = [HBDUtils colorWithHexString:titleTextColor];
144
143
  }
145
144
  if (titleTextSize) {
146
- [titleAttributes setObject:[UIFont systemFontOfSize:[titleTextSize floatValue]] forKey:NSFontAttributeName];
145
+ titleAttributes[NSFontAttributeName] = [UIFont systemFontOfSize:[titleTextSize floatValue]];
147
146
  }
148
-
147
+
149
148
  if (titleAttributes.count > 0) {
150
149
  if (self.hbd_titleTextAttributes) {
151
150
  NSMutableDictionary *attributes = [self.hbd_titleTextAttributes mutableCopy];
@@ -155,26 +154,26 @@
155
154
  self.hbd_titleTextAttributes = titleAttributes;
156
155
  }
157
156
  }
158
-
157
+
159
158
  NSString *topBarColor = options[@"topBarColor"];
160
159
  if (topBarColor) {
161
160
  self.hbd_barTintColor = [HBDUtils colorWithHexString:topBarColor];
162
161
  }
163
-
162
+
164
163
  NSNumber *topBarAlpha = options[@"topBarAlpha"];
165
164
  if (topBarAlpha) {
166
165
  self.hbd_barAlpha = [topBarAlpha floatValue];
167
166
  }
168
-
167
+
169
168
  NSNumber *topBarHidden = options[@"topBarHidden"];
170
169
  if ([topBarHidden boolValue]) {
171
170
  self.hbd_barHidden = YES;
172
171
  }
173
-
172
+
174
173
  if ([HBDGarden globalStyle].isBackTitleHidden) {
175
174
  self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:NULL];
176
175
  }
177
-
176
+
178
177
  NSDictionary *backItem = options[@"backItemIOS"];
179
178
  if (backItem) {
180
179
  NSString *title = backItem[@"title"];
@@ -186,32 +185,32 @@
186
185
  }
187
186
  self.navigationItem.backBarButtonItem = backButton;
188
187
  }
189
-
188
+
190
189
  NSNumber *swipeBackEnabled = options[@"swipeBackEnabled"];
191
190
  if (swipeBackEnabled) {
192
191
  self.hbd_swipeBackEnabled = [swipeBackEnabled boolValue];
193
192
  }
194
-
193
+
195
194
  NSNumber *extendedLayoutIncludesTopBar = options[@"extendedLayoutIncludesTopBar"];
196
195
  if (extendedLayoutIncludesTopBar) {
197
196
  self.extendedLayoutIncludesOpaqueBars = [extendedLayoutIncludesTopBar boolValue];
198
197
  }
199
-
198
+
200
199
  NSNumber *hideShadow = options[@"topBarShadowHidden"];
201
200
  if (hideShadow) {
202
201
  self.hbd_barShadowHidden = [hideShadow boolValue];
203
202
  }
204
-
203
+
205
204
  NSNumber *statusBarHidden = options[@"statusBarHidden"];
206
205
  if (statusBarHidden) {
207
206
  self.hbd_statusBarHidden = [statusBarHidden boolValue];
208
207
  }
209
-
208
+
210
209
  NSNumber *backInteractive = options[@"backInteractive"];
211
210
  if (backInteractive) {
212
211
  self.hbd_backInteractive = [backInteractive boolValue];
213
212
  }
214
-
213
+
215
214
  NSNumber *backButtonHidden = options[@"backButtonHidden"];
216
215
  if (backButtonHidden) {
217
216
  if ([backButtonHidden boolValue]) {
@@ -228,7 +227,7 @@
228
227
  }
229
228
  }
230
229
  }
231
-
230
+
232
231
  NSDictionary *titleItem = options[@"titleItem"];
233
232
  if (titleItem) {
234
233
  NSString *moduleName = titleItem[@"moduleName"];
@@ -236,22 +235,22 @@
236
235
  self.navigationItem.title = titleItem[@"title"];
237
236
  }
238
237
  }
239
-
238
+
240
239
  id rightBarButtonItem = options[@"rightBarButtonItem"];
241
240
  if (rightBarButtonItem) {
242
241
  [self.garden setRightBarButtonItem:RCTNilIfNull(rightBarButtonItem)];
243
242
  }
244
-
243
+
245
244
  id leftBarButtonItem = options[@"leftBarButtonItem"];
246
245
  if (leftBarButtonItem) {
247
246
  [self.garden setLeftBarButtonItem:RCTNilIfNull(leftBarButtonItem)];
248
247
  }
249
-
248
+
250
249
  NSArray *rightBarButtonItems = options[@"rightBarButtonItems"];
251
250
  if (rightBarButtonItems) {
252
251
  [self.garden setRightBarButtonItems:rightBarButtonItems];
253
252
  }
254
-
253
+
255
254
  NSArray *leftBarButtonItems = options[@"leftBarButtonItems"];
256
255
  if (leftBarButtonItems) {
257
256
  [self.garden setLeftBarButtonItems:leftBarButtonItems];
@@ -285,24 +284,24 @@
285
284
  }
286
285
 
287
286
  [self applyNavigationBarOptions:target];
288
-
287
+
289
288
  NSString *screenColor = options[@"screenBackgroundColor"];
290
289
  if (screenColor && [self isViewLoaded]) {
291
290
  self.view.backgroundColor = [HBDUtils colorWithHexString:screenColor];
292
291
  }
293
292
 
294
- NSNumber *statusBarHidden = [options objectForKey:@"statusBarHidden"];
293
+ NSNumber *statusBarHidden = options[@"statusBarHidden"];
295
294
  if (statusBarHidden) {
296
295
  [self setNeedsStatusBarAppearanceUpdate];
297
296
  }
298
-
299
- if ([options objectForKey:@"homeIndicatorAutoHiddenIOS"]) {
297
+
298
+ if (options[@"homeIndicatorAutoHiddenIOS"]) {
300
299
  if (@available(iOS 11.0, *)) {
301
300
  [self setNeedsUpdateOfHomeIndicatorAutoHidden];
302
301
  }
303
302
  }
304
303
 
305
- NSNumber *passThroughTouches = [options objectForKey:@"passThroughTouches"];
304
+ NSNumber *passThroughTouches = options[@"passThroughTouches"];
306
305
  if (passThroughTouches) {
307
306
  [self.garden setPassThroughTouches:[passThroughTouches boolValue]];
308
307
  }
@@ -315,7 +314,7 @@
315
314
  - (BOOL)shouldUpdateNavigationBar:(NSDictionary *)options compareTo:(NSDictionary *)previous {
316
315
  NSArray *keys = @[@"topBarStyle", @"topBarColor", @"topBarAlpha", @"tintColor", @"topBarShadowHidden"];
317
316
  for (NSString *opt in options.allKeys) {
318
- if ([keys containsObject:opt] && [NSString stringWithFormat:@"%@", previous[opt]] != [NSString stringWithFormat:@"%@",options[opt]]) {
317
+ if ([keys containsObject:opt] && [NSString stringWithFormat:@"%@", previous[opt]] != [NSString stringWithFormat:@"%@", options[opt]]) {
319
318
  return YES;
320
319
  }
321
320
  }
@@ -16,9 +16,9 @@
16
16
 
17
17
  - (void)redirectToViewController:(UIViewController *)controller target:(UIViewController *)target animated:(BOOL)animated {
18
18
  NSMutableArray *children = [self.childViewControllers mutableCopy];
19
- NSInteger count = self.childViewControllers.count;
20
- for (NSInteger i = count - 1; i > -1; i--) {
21
- UIViewController *child = [children objectAtIndex:i];
19
+ NSUInteger count = self.childViewControllers.count;
20
+ for (NSUInteger i = count - 1; i > -1; i--) {
21
+ UIViewController *child = children[i];
22
22
  [children removeObjectAtIndex:i];
23
23
  if (child == target) {
24
24
  break;
@@ -10,34 +10,35 @@
10
10
  #import "HBDDrawerController.h"
11
11
 
12
12
  typedef void(^HBDDidShowActionBlock)(void);
13
+
13
14
  typedef void(^HBDDidHideActionBlock)(void);
14
15
 
15
16
  @interface UIViewController (HBD)
16
17
 
17
- @property (nonatomic, assign) UIBarStyle hbd_barStyle;
18
- @property (nonatomic, strong) UIColor *hbd_barTintColor;
19
- @property (nonatomic, strong) UIColor *hbd_tintColor;
20
- @property (nonatomic, strong) NSDictionary *hbd_titleTextAttributes;
21
- @property (nonatomic, assign) float hbd_barAlpha;
22
- @property (nonatomic, assign) BOOL hbd_barHidden;
23
- @property (nonatomic, assign) BOOL hbd_barShadowHidden;
24
- @property (nonatomic, assign) BOOL hbd_backInteractive;
25
- @property (nonatomic, assign) BOOL hbd_swipeBackEnabled;
26
- @property (nonatomic, assign, readonly) float hbd_barShadowAlpha;
27
- @property (nonatomic, assign) BOOL hbd_statusBarHidden;
28
-
29
- @property (nonatomic, assign) BOOL hbd_viewAppeared;
30
- @property (nonatomic, copy) HBDDidShowActionBlock didShowActionBlock;
31
- @property (nonatomic, copy) HBDDidHideActionBlock didHideActionBlock;
18
+ @property(nonatomic, assign) UIBarStyle hbd_barStyle;
19
+ @property(nonatomic, strong) UIColor *hbd_barTintColor;
20
+ @property(nonatomic, strong) UIColor *hbd_tintColor;
21
+ @property(nonatomic, strong) NSDictionary *hbd_titleTextAttributes;
22
+ @property(nonatomic, assign) float hbd_barAlpha;
23
+ @property(nonatomic, assign) BOOL hbd_barHidden;
24
+ @property(nonatomic, assign) BOOL hbd_barShadowHidden;
25
+ @property(nonatomic, assign) BOOL hbd_backInteractive;
26
+ @property(nonatomic, assign) BOOL hbd_swipeBackEnabled;
27
+ @property(nonatomic, assign, readonly) float hbd_barShadowAlpha;
28
+ @property(nonatomic, assign) BOOL hbd_statusBarHidden;
29
+
30
+ @property(nonatomic, assign) BOOL hbd_viewAppeared;
31
+ @property(nonatomic, copy) HBDDidShowActionBlock didShowActionBlock;
32
+ @property(nonatomic, copy) HBDDidHideActionBlock didHideActionBlock;
32
33
 
33
34
  - (void)hbd_setNeedsUpdateNavigationBar;
34
35
 
35
- @property (nonatomic, assign) BOOL hbd_extendedLayoutDidSet;
36
+ @property(nonatomic, assign) BOOL hbd_extendedLayoutDidSet;
36
37
 
37
38
  @property(nonatomic, copy, readonly) NSString *sceneId;
38
- @property (nonatomic, assign) NSInteger resultCode;
39
- @property (nonatomic, assign) NSInteger requestCode;
40
- @property (nonatomic, copy) NSDictionary *resultData;
39
+ @property(nonatomic, assign) NSInteger resultCode;
40
+ @property(nonatomic, assign) NSInteger requestCode;
41
+ @property(nonatomic, copy) NSDictionary *resultData;
41
42
 
42
43
  - (void)setResultCode:(NSInteger)resultCode resultData:(NSDictionary *)data;
43
44