Enhance full image view support to work with 3 panel mode and split window views

This commit is contained in:
Maurice Parker
2019-10-16 20:20:36 -05:00
parent 6c562f93b5
commit eca5f8259a
5 changed files with 337 additions and 341 deletions

View File

@@ -28,6 +28,13 @@ class ImageViewController: UIViewController {
imageScrollView.display(image: image)
}
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)
coordinator.animate(alongsideTransition: { [weak self] context in
self?.imageScrollView.resize()
})
}
@IBAction func share(_ sender: Any) {
guard let image = image else { return }
let activityViewController = UIActivityViewController(activityItems: [image], applicationActivities: nil)
@@ -46,9 +53,6 @@ class ImageViewController: UIViewController {
extension ImageViewController: ImageScrollViewDelegate {
func imageScrollViewDidChangeOrientation(imageScrollView: ImageScrollView) {
}
func imageScrollViewDidGestureSwipeUp(imageScrollView: ImageScrollView) {
dismiss(animated: true)
}