Fix gallery content scrolling unnecessarily in certain circumstances

This commit is contained in:
Shadowfacts 2024-11-25 20:40:13 -05:00
parent c716f03784
commit 351efe4b58
1 changed files with 4 additions and 0 deletions

View File

@ -69,6 +69,10 @@ class GalleryItemViewController: UIViewController {
scrollView = UIScrollView()
scrollView.translatesAutoresizingMaskIntoConstraints = false
scrollView.delegate = self
// We calculate zoom/position ignoring the safe area, so content insets need to not incorporate it either.
// Otherwise, content that fills the screen (extending into the safe area) may still end up scrollable
// (this is readily observable with tall images on a landscape iPad).
scrollView.contentInsetAdjustmentBehavior = .never
view.addSubview(scrollView)