|
@@ -181,6 +181,9 @@
|
181
|
181
|
if (options.topBar.component.name.hasValue) {
|
182
|
182
|
RCTRootView *reactView = [_componentRegistry createComponentIfNotExists:options.topBar.component parentComponentId:navigationController.layoutInfo.componentId reactViewReadyBlock:readyBlock];
|
183
|
183
|
|
|
184
|
+ if (_customTopBar) {
|
|
185
|
+ [_customTopBar removeFromSuperview];
|
|
186
|
+ }
|
184
|
187
|
_customTopBar = [[RNNCustomTitleView alloc] initWithFrame:navigationController.navigationBar.bounds subView:reactView alignment:@"fill"];
|
185
|
188
|
reactView.backgroundColor = UIColor.clearColor;
|
186
|
189
|
_customTopBar.backgroundColor = UIColor.clearColor;
|
|
@@ -202,6 +205,9 @@
|
202
|
205
|
if (options.topBar.background.component.name.hasValue) {
|
203
|
206
|
RCTRootView *reactView = [_componentRegistry createComponentIfNotExists:options.topBar.background.component parentComponentId:navigationController.layoutInfo.componentId reactViewReadyBlock:readyBlock];
|
204
|
207
|
|
|
208
|
+ if (_customTopBarBackground) {
|
|
209
|
+ [_customTopBarBackground removeFromSuperview];
|
|
210
|
+ }
|
205
|
211
|
_customTopBarBackground = [[RNNCustomTitleView alloc] initWithFrame:navigationController.navigationBar.bounds subView:reactView alignment:@"fill"];
|
206
|
212
|
[navigationController.navigationBar insertSubview:_customTopBarBackground atIndex:1];
|
207
|
213
|
} else {
|