Question

in my app i am having one image view which contains the picture of user taken from either camera or phone library(album).And the user is allowed to select some product from a list of products for trying on his picture. I am able to do all this stuff and also i am able to do the panning, zooming and also rotation on the product. But my problem is, when i am moving this product it is going out of the image view that contains the users picture and same thing happening with the zooming ..Please help me through this..Thanks in advance..

Was it helpful?

Solution

You need to restrict it in the frame of outerview.

so CGRECT methods can serve your purpose.

such as

CGRectIntersectsRect
CGRectContainsPoint

for reference see this

and for zooming purpose see this

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top