views:

50

answers:

1
-(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];
} 

can anyone help me figure out why this code doesn't work?

+1  A: 

This method will call beginAnimations: and commitAnimations, which cannot be nested.

[self presentModalViewController:tempVC animated:YES];

So move it to before beginAnimations: or after commitAnimations.

drawnonward
Well I moved it to both places and the UIView doesn't curl up like a page turning. The SignView slides into place instead of Curling into place.
Cocoa Dev