-(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];
}
任何人都可以帮我弄清楚为什么这段代码不起作用?
答案 0 :(得分:1)
此方法将调用beginAnimations:和commitAnimations,它们不能嵌套。
[self presentModalViewController:tempVC animated:YES];
所以将它移到beginAnimations之前:或者在commitAnimations之后。