Skip to content

Commit

Permalink
Layout problem on back from UnifiedSearchViewController, enhancement …
Browse files Browse the repository at this point in the history
…for #3084

Signed-off-by: ismailgulek <gulekismail@gmail.com>
  • Loading branch information
ismailgulek committed Apr 13, 2020
1 parent 8533fd5 commit e9a8cdf
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Riot/Modules/GlobalSearch/UnifiedSearchViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,18 @@ - (void)viewWillAppear:(BOOL)animated
[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];
Expand Down

0 comments on commit e9a8cdf

Please sign in to comment.