diff --git a/AltStore/App Detail/AppViewController.swift b/AltStore/App Detail/AppViewController.swift index 3ef72750..e4cbc46d 100644 --- a/AltStore/App Detail/AppViewController.swift +++ b/AltStore/App Detail/AppViewController.swift @@ -266,7 +266,18 @@ final class AppViewController: UIViewController } let difference = self.scrollView.contentOffset.y - showNavigationBarThreshold - let range = (headerFrame.height + padding) - (self.navigationController?.navigationBar.bounds.height ?? self.view.safeAreaInsets.top) + + let range: Double + if self.presentingViewController == nil && self.parent?.presentingViewController == nil + { + // Not presented modally, so rely on safe area + navigation bar height. + range = (headerFrame.height + padding) - (self.navigationController?.navigationBar.bounds.height ?? self.view.safeAreaInsets.top) + } + else + { + // Presented modally, so rely on maximumContentY. + range = maximumContentY - (maximumContentY - padding - headerFrame.height) - inset + } let fractionComplete = min(difference, range) / range self.navigationBarAnimator?.fractionComplete = fractionComplete diff --git a/AltStore/Components/HeaderContentViewController.swift b/AltStore/Components/HeaderContentViewController.swift index 77772930..394d044b 100644 --- a/AltStore/Components/HeaderContentViewController.swift +++ b/AltStore/Components/HeaderContentViewController.swift @@ -299,7 +299,7 @@ class HeaderContentViewController