Layout problem on back from UnifiedSearchViewController, enhancement for #3084

Signed-off-by: ismailgulek <gulekismail@gmail.com>
This commit is contained in:
ismailgulek
2020-04-13 11:57:12 +03:00
parent 941627fca3
commit 4e087fe1f2
@@ -153,6 +153,18 @@
[self updateSearch];
}
- (void)viewWillDisappear:(BOOL)animated
{
if (!self.searchBarHidden && self.extendedLayoutIncludesOpaqueBars)
{
// if a search bar is visible, navigationBar height will be increased. Below code will force update layout on previous view controller.
[self.navigationController.view setNeedsLayout]; // force update layout
[self.navigationController.view layoutIfNeeded]; // to fix height of the navigation bar
}
[super viewWillDisappear:animated];
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];