Przeglądaj źródła

Reset navigationItem.titleView before applying new one, Fix topBar.titleView calculation on props change (#5041)

Yogev Ben David 6 lat temu
rodzic
commit
f3b1d34ea6
No account linked to committer's email address
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1
    0
      lib/ios/RNNViewControllerPresenter.m

+ 1
- 0
lib/ios/RNNViewControllerPresenter.m Wyświetl plik

169
 		NSString* alignment = [options.topBar.title.component.alignment getWithDefaultValue:@""];
169
 		NSString* alignment = [options.topBar.title.component.alignment getWithDefaultValue:@""];
170
 		[_customTitleView setAlignment:alignment];
170
 		[_customTitleView setAlignment:alignment];
171
 
171
 
172
+		viewController.navigationItem.titleView = nil;
172
 		viewController.navigationItem.titleView = _customTitleView;
173
 		viewController.navigationItem.titleView = _customTitleView;
173
 	} else {
174
 	} else {
174
 		[_customTitleView removeFromSuperview];
175
 		[_customTitleView removeFromSuperview];