2

How can I scale the view by pan gesture?

I am facing an issue with the pinch gesture when the view is so small that I can not perform a pinch operation. Is it possible with pan gesture? Or is there any solution with pinch gesture?

I am thinking about pan gesture because we could scale by dragging from corner.

Any solution?

rghome
  • 8,529
  • 8
  • 43
  • 62
Jagdeep Singh
  • 2,556
  • 3
  • 18
  • 28
  • Are you that is shall be a pan gesture recognizer instead of [pinch](https://developer.apple.com/documentation/uikit/uipinchgesturerecognizer)? – Ahmad F Nov 14 '17 at 11:17
  • yes, you are correct – Jagdeep Singh Nov 14 '17 at 11:19
  • Related: https://stackoverflow.com/questions/42965235/swift-3-how-do-i-pinch-to-scale-and-rotate-uiimageview https://stackoverflow.com/questions/42965235/swift-3-how-do-i-pinch-to-scale-and-rotate-uiimageview https://stackoverflow.com/questions/18048581/use-uipinchgesturerecognizer-to-scale-view-in-direction-of-pinch – Ahmad F Nov 14 '17 at 11:20
  • But they are using pinch gesture for scaling. if view is small then there will difficulty to perform pinch gesture. because two fingers can not placed on view. – Jagdeep Singh Nov 14 '17 at 11:25
  • I could post an answer with using the pinch. However, I would suggest that you could double tap on the view to increase its scale... – Ahmad F Nov 14 '17 at 11:30
  • yeah i have added double tap gesture to double the scale size. but i am thinking with pan if possible. I have seen this functionality in some apps. – Jagdeep Singh Nov 14 '17 at 11:36
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/158953/discussion-between-jagdeep-singh-and-ahmad-f). – Jagdeep Singh Nov 14 '17 at 11:42
  • unfortunately I can't for now join the chat, we could comment and delete the previous ones. – Ahmad F Nov 14 '17 at 12:36

0 Answers0