diff --git a/Sources/VLCCloudStorageTableViewController.m b/Sources/VLCCloudStorageTableViewController.m index ace423be630a7679c563ed7339db60db44d906e9..e824f882de21ffe8be68f681543d1ae4f3d63bcf 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]; }