Large Image VC: Hide home indicator when controls hidden
This commit is contained in:
parent
730308df3f
commit
ea143ea0dd
|
@ -43,6 +43,8 @@ class LargeImageViewController: UIViewController, UIScrollViewDelegate {
|
|||
|
||||
var controlsVisible = true {
|
||||
didSet {
|
||||
setNeedsUpdateOfHomeIndicatorAutoHidden()
|
||||
|
||||
UIView.animate(withDuration: 0.2) {
|
||||
let topOffset = self.controlsVisible ? 0 : -self.topControlsView.bounds.height
|
||||
self.topControlsView.transform = CGAffineTransform(translationX: 0, y: topOffset)
|
||||
|
@ -60,7 +62,11 @@ class LargeImageViewController: UIViewController, UIScrollViewDelegate {
|
|||
return true
|
||||
}
|
||||
|
||||
init(image: UIImage, description: String?, sourceFrame: CGRect, sourceCornerRadius: CGFloat) {
|
||||
override var prefersHomeIndicatorAutoHidden: Bool {
|
||||
return !controlsVisible
|
||||
}
|
||||
|
||||
init(image: UIImage, description: String?, sourceFrame: CGRect?, sourceCornerRadius: CGFloat?) {
|
||||
self.image = image
|
||||
self.imageDescription = description
|
||||
self.originFrame = sourceFrame
|
||||
|
|
Loading…
Reference in New Issue