Supports viewing full screen app screenshots from AppViewController

[Missed] Uses layout config for PreviewAppScreenshots
This commit is contained in:
Riley Testut
2023-10-12 15:19:18 -05:00
committed by Magesh K
parent 86ec59d204
commit c15459e313
4 changed files with 192 additions and 15 deletions

View File

@@ -142,6 +142,14 @@ final class AppViewController: UIViewController
self.view.layoutIfNeeded()
}
override func viewIsAppearing(_ animated: Bool)
{
super.viewIsAppearing(animated)
// Prevent banner temporarily flashing a color due to being added back to self.view.
self.bannerView.backgroundEffectView.backgroundColor = .clear
}
override func viewDidAppear(_ animated: Bool)
{
super.viewDidAppear(animated)
@@ -191,21 +199,7 @@ final class AppViewController: UIViewController
self._shouldResetLayout = false
}
let statusBarHeight: Double
if let navigationController, navigationController.presentingViewController != nil, navigationController.modalPresentationStyle != .fullScreen
{
statusBarHeight = 20
}
else if let statusBarManager = self.view.window?.windowScene?.statusBarManager
{
statusBarHeight = statusBarManager.statusBarFrame.height
}
else
{
statusBarHeight = 0
}
let statusBarHeight = (self.view.window ?? self.presentedViewController?.view.window)?.windowScene?.statusBarManager?.statusBarFrame.height ?? 0
let cornerRadius = self.contentViewControllerShadowView.layer.cornerRadius
let inset = 12 as CGFloat