forked from shadowfacts/Tusker
Ignore safe area for gallery content
This commit is contained in:
parent
c05107bccd
commit
509ed305cd
|
@ -64,8 +64,7 @@ class GalleryItemViewController: UIViewController {
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
||||||
let scrollView = UIScrollView()
|
scrollView = UIScrollView()
|
||||||
self.scrollView = scrollView
|
|
||||||
scrollView.translatesAutoresizingMaskIntoConstraints = false
|
scrollView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
scrollView.delegate = self
|
scrollView.delegate = self
|
||||||
|
|
||||||
|
@ -288,8 +287,8 @@ class GalleryItemViewController: UIViewController {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let heightScale = view.safeAreaLayoutGuide.layoutFrame.height / content.contentSize.height
|
let heightScale = view.bounds.height / content.contentSize.height
|
||||||
let widthScale = view.safeAreaLayoutGuide.layoutFrame.width / content.contentSize.width
|
let widthScale = view.bounds.width / content.contentSize.width
|
||||||
let minScale = min(widthScale, heightScale)
|
let minScale = min(widthScale, heightScale)
|
||||||
let maxScale = minScale >= 1 ? minScale + 2 : 2
|
let maxScale = minScale >= 1 ? minScale + 2 : 2
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue