I'm trying to perform an animation from within a UIView subclass, on one of its subviews.
The animation duration ignores any value I try to set it to, and just performs on a permanent duration of ~2 secs.
The finished flag returns with True.
[UIView animateWithDuration:0.5f animations:^{
img.frame = newFrame;
} completion:^(BOOL finished) {
NSLog(@"result: %d", finished);
}];
When I'm using the old way, it works fine:
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.5f];
img.frame = newIconRectFinal;
[UIView commitAnimations];
What could be the problem?