-(IBAction)gameplayButtonClicked{
GamePlayViewController *screen3 = [[GamePlayViewController alloc] initWithNibName:nil bundle:nil];
screen3.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:screen3 animated:YES];
[screen3 release];
}
-(IBAction)gameplayButtonClicked{ GamePlayViewController *screen3 = [[GamePlayViewController alloc] initWithNibName:nil bundle:nil]; screen3.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [self presentModalViewController:screen3 animated:YES];
Share
When you call presentModalViewController:animated: the screen3 VC will be pushed onto the view hierarchy and retained there. You should call dismissModalViewControllerAnimated: when the modal VC is done which will release it from the view hierarchy.