Inset gallery controls on devices without safe area insets
This commit is contained in:
parent
1166c6e639
commit
b8fe0454b5
|
@ -180,6 +180,8 @@ class GalleryItemViewController: UIViewController {
|
||||||
captionTextView.heightAnchor.constraint(equalToConstant: 150),
|
captionTextView.heightAnchor.constraint(equalToConstant: 150),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
updateTopControlsInsets()
|
||||||
|
|
||||||
singleTap = UITapGestureRecognizer(target: self, action: #selector(viewPressed))
|
singleTap = UITapGestureRecognizer(target: self, action: #selector(viewPressed))
|
||||||
singleTap.delegate = self
|
singleTap.delegate = self
|
||||||
doubleTap = UITapGestureRecognizer(target: self, action: #selector(viewDoublePressed))
|
doubleTap = UITapGestureRecognizer(target: self, action: #selector(viewDoublePressed))
|
||||||
|
@ -366,6 +368,11 @@ class GalleryItemViewController: UIViewController {
|
||||||
shareButtonTopConstraint.constant = 24
|
shareButtonTopConstraint.constant = 24
|
||||||
closeButtonTrailingConstraint.constant = 24
|
closeButtonTrailingConstraint.constant = 24
|
||||||
closeButtonTopConstraint.constant = 24
|
closeButtonTopConstraint.constant = 24
|
||||||
|
} else {
|
||||||
|
shareButtonLeadingConstraint.constant = 8
|
||||||
|
shareButtonTopConstraint.constant = 8
|
||||||
|
closeButtonTrailingConstraint.constant = 8
|
||||||
|
closeButtonTopConstraint.constant = 8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue