iOS Transform Translate Animation not performing correctly -


So I'm trying to do a simple (simple) animation animation on a UIImageView by transferring it over 100 points . This is my code:

  [UIView animateWithDuration: 1 delay: 1 option: zero animation: ^ (zero) {CGAffineTransform tf = CGAffineTransformMakeTranslation (0, -100); [Image Settress: TF]; } Closing: ^ (BOOL Finish) {}];  

This works ... but it for some reason chooses a new root to get started for my UIImageView. For example, if the original center of the image is coordinates (300, 400), then by my code it should translate 100 points (300, 300). But for some reason, this code starts the image slightly, from where it should be (300, 450), and then it will grow to 100 (300, 350). How can I do an animation from where the image is basically?

If you want to use the change for this process, then you should bring the original version and translate it Should try to do 100 px by.

  [Image Set Transform: CGAffineTransformTranslate (image.transform, 0, -100)];  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -