From 509ed305cd16e111ab62b6adac41346fd895db50 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Fri, 29 Mar 2024 22:06:28 -0400 Subject: [PATCH] Ignore safe area for gallery content --- .../Sources/GalleryVC/GalleryItemViewController.swift | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Packages/GalleryVC/Sources/GalleryVC/GalleryItemViewController.swift b/Packages/GalleryVC/Sources/GalleryVC/GalleryItemViewController.swift index 4e6c9fea57..c5d9f6d1db 100644 --- a/Packages/GalleryVC/Sources/GalleryVC/GalleryItemViewController.swift +++ b/Packages/GalleryVC/Sources/GalleryVC/GalleryItemViewController.swift @@ -64,8 +64,7 @@ class GalleryItemViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - let scrollView = UIScrollView() - self.scrollView = scrollView + scrollView = UIScrollView() scrollView.translatesAutoresizingMaskIntoConstraints = false scrollView.delegate = self @@ -288,8 +287,8 @@ class GalleryItemViewController: UIViewController { return } - let heightScale = view.safeAreaLayoutGuide.layoutFrame.height / content.contentSize.height - let widthScale = view.safeAreaLayoutGuide.layoutFrame.width / content.contentSize.width + let heightScale = view.bounds.height / content.contentSize.height + let widthScale = view.bounds.width / content.contentSize.width let minScale = min(widthScale, heightScale) let maxScale = minScale >= 1 ? minScale + 2 : 2