I'd like to make a very simple crop tool. I have UIImage in UIScrollview with UIImage set to Aspect Fill.
The problem is:
When I load an image that is bigger than the UIIMageview, it fills nicely but I can't pan around it.
When a zoom in a little bit, I am somewhat able to pan around but I can't pan to the very edge, it always bounces back.
The UIScrollView and UIImageView have same size, UIImageView is hooked to the UIScrollView via AutoLayout and the UIScrollView is hooked to the UIView with AutoLayout aswell.
I instantiated the scrollview like this:
@IBOutlet weak var scrollView: UIScrollView!{
didSet{
scrollView.delegate = self
scrollView.showsVerticalScrollIndicator = false
scrollView.showsHorizontalScrollIndicator = false
scrollView.minimumZoomScale = 1.0
scrollView.maximumZoomScale = 10.0
}
}
