What’s a simple way to let users drag an UIImageView around to position it in the place of their choice. It’s for a photography app.
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First, make a container view that would take care of touch events.
Then, you need a UIIMageView subclass that will make sure, that when you set a center of the object, it doesn’t go off-the-screen.
I made a class like that some time ago, here’s the code (it can also be animatable).
.h
.m
Hope it helps a bit!