1

In ViewController I have a big ImageView whose image is captured with a ImagePicker. I want the user to be allowed to zoom in/out the image and then pan it but always inside the ImageView dimensions which must not enlarge, move or dwindle. I have seen I could add a ScrollView to ImageView but I can't figure out how to do that.

Moreover: is it possible to zoom in/out more than one ImageView at a time? I mean I have some smaller imageViews floating upon a bigger imageView. Is it possible to zoom everything all together?

SagittariusA
  • 5,289
  • 15
  • 73
  • 127
  • 1
    Possible duplicate of [IOS: add imageview in a scrollview to have zoom](http://stackoverflow.com/questions/11318845/ios-add-imageview-in-a-scrollview-to-have-zoom) – Juri Noga Nov 27 '15 at 10:16

1 Answers1

-1

There are plenty of excellent scrollview demo's around.

These will show you where and how to add override functions to implement what you need...

If you have different UIImage Views you can set the zoom programmatically to match the image being "zoomed" ... try experimenting with [UIImage].zoomScale. and the image offset. Its going to get complicated if they are different sizes as you will have to take account of scale when mirroring offset and zoom changes.