diff --git a/AltStore/App Detail/AppViewController.swift b/AltStore/App Detail/AppViewController.swift index b79852a8..238dbe9c 100644 --- a/AltStore/App Detail/AppViewController.swift +++ b/AltStore/App Detail/AppViewController.swift @@ -107,6 +107,7 @@ class AppViewController: UIViewController NotificationCenter.default.addObserver(self, selector: #selector(AppViewController.didChangeApp(_:)), name: .NSManagedObjectContextObjectsDidChange, object: DatabaseManager.shared.viewContext) NotificationCenter.default.addObserver(self, selector: #selector(AppViewController.willEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(AppViewController.didBecomeActive(_:)), name: UIApplication.didBecomeActiveNotification, object: nil) self._backgroundBlurEffect = self.backgroundBlurView.effect as? UIBlurEffect self._backgroundBlurTintColor = self.backgroundBlurView.contentView.backgroundColor @@ -540,6 +541,15 @@ private extension AppViewController self._shouldResetLayout = true self.view.setNeedsLayout() } + + @objc func didBecomeActive(_ notification: Notification) + { + guard let navigationController = self.navigationController, navigationController.topViewController == self else { return } + + // Fixes Navigation Bar appearing after app becomes inactive -> active again. + self._shouldResetLayout = true + self.view.setNeedsLayout() + } } extension AppViewController: UIScrollViewDelegate