I have an animation of UIView using the following block based animation method. The animation basically resize a view width from 300 pixel to 0 in 60 seconds. But the problem is view is resized to 0 width even before 60 seconds(around 55-56 seconds) but the completion block is called in right time (after 60 seconds). Here is the code-
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(10, 150, 300, 40)];
view.backgroundColor = [UIColor redColor];
[self.window.rootViewController.view addSubview:view];
NSLog(@"start");
[UIView animateWithDuration:60.0f
animations:^{
view.frame = CGRectMake(10, 150, 0, 40);
} completion:^(BOOL finished) {
NSLog(@"Completion");
}
];
Can someone please say the reason for this?