How do I enable zooming in a UIScrollView?
UIScrollView
Make sure you set your viewController as the scrollViews delegate and implement:
func viewForZooming(in scrollView: UIScrollView) -> UIView? { return imageView }