Reputation: 1364
I have an image that I wish to animate after a view has appeared. I'm doing the following:
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
CGRect folderFrame = self.folderImage.frame;
folderFrame.origin.y += 250;
[UIView animateWithDuration:250 animations:^{
self.folderImage.frame = folderFrame;
}];
}
But I can't see any animation. What am I doing wrong?
Upvotes: 1
Views: 730
Reputation: 5313
If this is the exact code you are using, then the problem might be that you have the animation set to take 250 seconds (about 4 minutes). Is it possible that it is animating, just very, very slowly?
Upvotes: 3
Reputation: 30846
I think it is working, but moving 1 point per second, practically imperceptible. Try specifying a shorter duration for the animation.
Upvotes: 1