I just upgraded my iPhone 4 from iOS 4.2.1 to 4.3.2 and to XCode 4.0.2, and I am facing some fancy uiview animation problems. When I first run my application, this code runs fine:
[UIView beginAnimations:@"fadeAlphaIn" context:nil];
[UIView setAnimationDuration:0.5f];
viewClue.alpha = 1.0f;
[UIView commitAnimations];
But then, after rejecting the view, and then rejecting the modal view using the standard method:
[self presentModalViewController:more animated:YES]
and
[self dismissModalViewControllerAnimated:YES]
The first animation no longer works. Instead of fading, for example, the viewClue view simply jumps from alpha = 0 to alpha = 1. Similarly, other animations that change the frame property of the other view simply force the frame to go from the initial to the final value without animation. These animations worked great before the modal view was presented and rejected.
, iOS 4.3.2, , , . - ? ? , , .
,
EDIT: , , .
-(void) viewMapfunc
{
AudioServicesPlaySystemSound(soundID);
if(mapvisible){
[UIView animateWithDuration:0.5
delay:0.1
options:UIViewAnimationOptionAllowUserInteraction
animations:^{
map.frame = CGRectMake(0, 350, 320, 27);
mapscroll.frame = CGRectMake(0, 27, 320, 0);
}
completion:nil];
mapvisible = NO;
viewMapLabel.text = @"View Map";
}else {
[UIView animateWithDuration:0.5
delay:0.1
options:UIViewAnimationOptionAllowUserInteraction
animations:^{
map.frame = CGRectMake(0, 50, 320, 300);
mapscroll.frame = CGRectMake(0, 27, 320, 300);
}
completion:nil];
mapvisible = YES;
viewMapLabel.text = @"Hide Map";
}
}