I have used this previously in my app, and having looked over everything I cannot find the difference, but for some reason when I run:
-(void)moveSelectorToDisplayPosition:(id)sender{
int givenTag = [sender tag];
UIImageView *tempImageView = [displayedSelections objectAtIndex:givenTag];
[UIView beginAnimations:@"" context:NULL];
[UIView setAnimationDuration:.3];
tempImageView.frame = CGRectOffset(tempImageView.frame, 30 - tempImageView.frame.origin.x, 240 - tempImageView.frame.origin.y);
[UIView setAnimationDidStopSelector:@selector(loadInTextForSelectedTool:)];
[UIView commitAnimations];
}
loadInTextForSelectedTool does not get called and I cannot figure out why. No errors or anything.
This is the method I’m trying to run, could anyone let me know if they see anything amiss or maybe something I might have forgotten? I tried also setting the [UIView setAnimationDelegate:tempImageView]; but no luck :(.
-(void)loadInTextForSelectedTool:(id)sender;
Thanks.
You need to set the delegate to the controller that implements
loadInTextForSelectedTool:Also, according to the documentation, the selector should have the following form:
And finally, Apple discourages the use of this animation method in iOS 4.0 or later: