View Full Version : How do I detect when an UIImageView has reached a certain location?

Mar 7, 2009, 12:36 AM
Ok... I have an UIImageView that is animated. It moves vertically from y at 40 down to 300:

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
imvOne.frame = CGRectMake(imvOne.frame.origin.x, 300, imvOne.frame.size.width, imvOne.frame.size.height);
[UIView commitAnimations];

Animations run within their own thread, so how do I detect in my code when the UIImageView's location has reached y at 300? With a delegate? Which one and how? I need to perform an action when the UIImageView reaches certain points.