Основной вопрос анимации о смене просмотров - PullRequest
0 голосов
/ 28 апреля 2010
-(IBAction)buttonPressed1:(id)sender 
{
SignView *tempVC = [[SignView alloc] initWithNibName:@"SignView" bundle:Nil];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationTransition: UIViewAnimationTransitionCurlUp forView:self.view cache:YES];
[UIView setAnimationDelay:0.0f];
[UIView setAnimationDuration:0.2f];
[self presentModalViewController:tempVC animated:YES];
[tempVC passDataWithString:button1.titleLabel.text andColor:currentlySelectedColor isNightModeOn:nightMode.on];
[UIView commitAnimations];
} 

Может кто-нибудь помочь мне понять, почему этот код не работает?

1 Ответ

1 голос
/ 28 апреля 2010

Этот метод вызовет beginAnimations: и commitAnimations, которые не могут быть вложенными.

[self presentModalViewController:tempVC animated:YES];

Так что переместите его до beforeAnimations: или после commitAnimations.

...