I have a project that goes from a scene into a xib view - now I am trying to go from this xib to an xib with a EAGLView - How do I do this?
I have attempted the following (all morning long - with no luck) The secondView never clears - First of all is this possible? thanks
-(IBAction) btnClickedNext:(id) sender{
//---add the view of the view controller to the current view---
viewController = [[ThirdViewController alloc]initWithNibName:@"ThirdViewController" bundle:nil];
[UIView beginAnimations:@"Curling view" context:nil];
[UIView setAnimationDuration:1];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition: UIViewAnimationTransitionCurlUp forView:self.view cache:YES];
[self clearView];
[self.view addSubview:[viewController window]];
[UIView commitAnimations];
}
-(void) clearView {
[secondViewController.view removeFromSuperview];
}