From 17e5a279c6c9a31ead4b0d822d7b0fda77458813 Mon Sep 17 00:00:00 2001 From: Carola Nitz Date: Tue, 9 Jul 2019 21:21:26 +0200 Subject: [PATCH] VLCCloudViewcontroller: Fix lingering toolbar (closes #572) --- Sources/VLCCloudStorageTableViewController.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Sources/VLCCloudStorageTableViewController.m b/Sources/VLCCloudStorageTableViewController.m index ace423be..e824f882 100644 --- a/Sources/VLCCloudStorageTableViewController.m +++ b/Sources/VLCCloudStorageTableViewController.m @@ -25,6 +25,7 @@ UIRefreshControl *_refreshControl; UIBarButtonItem *_progressBarButtonItem; UIBarButtonItem *_logoutButton; + UINavigationController *tempNav; } @end @@ -102,13 +103,16 @@ - (void)viewWillAppear:(BOOL)animated { - self.navigationController.toolbarHidden = NO; + //Workaround since in viewWillDisappear self.navigationController can be nil which will lead to a lingering toolbar + tempNav = self.navigationController; + tempNav.toolbarHidden = NO; [super viewWillAppear:animated]; } - (void)viewWillDisappear:(BOOL)animated { - self.navigationController.toolbarHidden = YES; + tempNav.toolbarHidden = YES; + tempNav = nil; [super viewWillDisappear:animated]; } -- GitLab