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() {
|
||||
super.viewDidLoad()
|
||||
|
||||
let scrollView = UIScrollView()
|
||||
self.scrollView = scrollView
|
||||
scrollView = UIScrollView()
|
||||
scrollView.translatesAutoresizingMaskIntoConstraints = false
|
||||
scrollView.delegate = self
|
||||
|
||||
|
@ -288,8 +287,8 @@ class GalleryItemViewController: UIViewController {
|
|||
return
|
||||
}
|
||||
|
||||
let heightScale = view.safeAreaLayoutGuide.layoutFrame.height / content.contentSize.height
|
||||
let widthScale = view.safeAreaLayoutGuide.layoutFrame.width / content.contentSize.width
|
||||
let heightScale = view.bounds.height / content.contentSize.height
|
||||
let widthScale = view.bounds.width / content.contentSize.width
|
||||
let minScale = min(widthScale, heightScale)
|
||||
let maxScale = minScale >= 1 ? minScale + 2 : 2
|
||||
|
||||
|
|
Loading…
Reference in New Issue