From 0ec09bb4b83fd5d664731ad69144fd3ba162bd66 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Thu, 2 Mar 2023 14:50:06 -0600 Subject: [PATCH] Fixes AppViewController deprecation warnings --- AltStore/App Detail/AppViewController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AltStore/App Detail/AppViewController.swift b/AltStore/App Detail/AppViewController.swift index 40719233..e839f95a 100644 --- a/AltStore/App Detail/AppViewController.swift +++ b/AltStore/App Detail/AppViewController.swift @@ -218,8 +218,8 @@ class AppViewController: UIViewController self._shouldResetLayout = false } - - let statusBarHeight = UIApplication.shared.statusBarFrame.height + + let statusBarHeight = self.view.window?.windowScene?.statusBarManager?.statusBarFrame.height ?? 0 let cornerRadius = self.contentViewControllerShadowView.layer.cornerRadius let inset = 12 as CGFloat @@ -324,7 +324,7 @@ class AppViewController: UIViewController self.backButtonContainerView.layer.cornerRadius = self.backButtonContainerView.bounds.midY - self.scrollView.scrollIndicatorInsets.top = statusBarHeight + self.scrollView.verticalScrollIndicatorInsets.top = statusBarHeight // Adjust content offset + size. let contentOffset = self.scrollView.contentOffset