You need to use block for your animation so like it : (Note the UIViewAnimationOptionAllowUserInteraction
, which is important)
[UIView animateWithDuration:10 delay:0 options:UIViewAnimationOptionAllowUserInteraction animations:^{
// Your animation here
} completion:^(BOOL finished) {
// Once completed do stuff here;
}];
I let you set the other params like you want.
If you need to work prior to iOS 4.0, you will need to set your animation in a separate thread. Check here for more info.