lvnkmn / Zoomy

Adds seamless scrollView and instagram like zooming to UIImageViews in any view hierarchy.
MIT License
206 stars 25 forks source link

zoom in and out, and move the image #86

Closed stevendinggang closed 10 months ago

stevendinggang commented 11 months ago

Hello, dear friend, what if I need to zoom in and out, and move the image anywhere on the screen, and then, when the gesture is over, I don't need to go back to the centre? How to change .... I've tried many times, and it seems that the current code goes back to the original (screen centred).

lvnkmn commented 11 months ago

Hi @stevendinggang, I'm not sure what you mean by not letting it go back to the center. But it may be helpful to know that there's two main settings: One which behaves like instagram where the image goes back to where it came from after ending your gesture. The second in which the image stays in "full parenview" size upon ending your first gesture.

It's been a while since I've used this package myself, so I don't know by heart if the default behavior of the second option fits your needs. If it doesn't it will likely need a pull request adding this functionality.

Unfortunately I won't be able to implement nor explain how this can be implemented due to time constraints. If you do happen to add this yourself, I'm happy to merge and publish it.

Kind regards

lvnkmn commented 11 months ago

The available settings can by passed as an argment when adding zoombehavior to an UIImageView by the way. The available options will appear when typing "." after the settings: argument.

stevendinggang commented 10 months ago

I'm sorry, I was analyzing it later, and then I felt, that that function should not be a normal image viewer, and your code is actually working very well. I'm using it too, thank you.