From b8fe0454b58ff660bc52f54e6ac7b2b3e480cc51 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 30 Mar 2024 15:18:17 -0400 Subject: [PATCH] Inset gallery controls on devices without safe area insets --- .../Sources/GalleryVC/GalleryItemViewController.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Packages/GalleryVC/Sources/GalleryVC/GalleryItemViewController.swift b/Packages/GalleryVC/Sources/GalleryVC/GalleryItemViewController.swift index c8c10953c5..01e348d303 100644 --- a/Packages/GalleryVC/Sources/GalleryVC/GalleryItemViewController.swift +++ b/Packages/GalleryVC/Sources/GalleryVC/GalleryItemViewController.swift @@ -180,6 +180,8 @@ class GalleryItemViewController: UIViewController { captionTextView.heightAnchor.constraint(equalToConstant: 150), ]) + updateTopControlsInsets() + singleTap = UITapGestureRecognizer(target: self, action: #selector(viewPressed)) singleTap.delegate = self doubleTap = UITapGestureRecognizer(target: self, action: #selector(viewDoublePressed)) @@ -366,6 +368,11 @@ class GalleryItemViewController: UIViewController { shareButtonTopConstraint.constant = 24 closeButtonTrailingConstraint.constant = 24 closeButtonTopConstraint.constant = 24 + } else { + shareButtonLeadingConstraint.constant = 8 + shareButtonTopConstraint.constant = 8 + closeButtonTrailingConstraint.constant = 8 + closeButtonTopConstraint.constant = 8 } }