How can I do a simple position changing for UIImageView. Lets say that current coordinates are x: 20 and y:30
I want to move it to x:100 and y:100.
Is it possible to do animation of movement?
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.
You need to change the CGFrame of that
UIImageViewLike so –[imageView setFrame:CGRectMake(100, 100, imageView.frame.size.width, imageView.frame.size.height)];This changes the
uiimageviewpoistion to(100, 100)while keeping the height and width same. Note that you can use the above code to not only change the(x,y)position but also the size of the view. Using the below code you can animate it too 🙂If you want to animate the position change –