forked from shadowfacts/Tusker
Fix gallery content scrolling unnecessarily in certain circumstances
This commit is contained in:
parent
c716f03784
commit
351efe4b58
|
@ -69,6 +69,10 @@ class GalleryItemViewController: UIViewController {
|
||||||
scrollView = UIScrollView()
|
scrollView = UIScrollView()
|
||||||
scrollView.translatesAutoresizingMaskIntoConstraints = false
|
scrollView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
scrollView.delegate = self
|
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)
|
view.addSubview(scrollView)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue