Skip to content

Commit

Permalink
Layout problem on back from RoomSearchViewController, fixes #3073
Browse files Browse the repository at this point in the history
Signed-off-by: ismailgulek <gulekismail@gmail.com>
  • Loading branch information
ismailgulek committed Apr 10, 2020
1 parent b153bc4 commit 8533fd5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Riot/Modules/Room/Search/RoomSearchViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,18 @@ - (void)viewDidAppear:(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];
}

#pragma mark -

- (void)setRoomDataSource:(MXKRoomDataSource *)roomDataSource
Expand Down

0 comments on commit 8533fd5

Please sign in to comment.