문제

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..

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top