[UIView animateWithDuration:10.0f animations:^{ Moving_Cloud.frame = CGRectMake(200.0f, 150.0f, Moving_Cloud.frame.size.width, Moving_Cloud.frame.size.height); } completion:^(BOOL finished){ CGPoint newPost = Moving_Cloud.frame.origin; CGFloat xPos = newPost.x; CGFloat yPos = newPost.y;
At the end of your animation, the "end:" block will be launched.
Usually your image should be at x = 200, y = 150.
Keep in mind that these coordinates relate to this superwin (viewing the Moving_Cloud view).
Note:
By convention, I recommend changing "Moving_Cloud" to "movingCloud".
The instance class begins with the bottom cover in objective-C.
Also, do not use _, but instead capital letter.
source share