Seeking help.
My Project:
i make a book for children.
Every page is a custom ViewController.
On every Page i have a button for next and previous Page.
When the NextPage-Button is pressed I “switch”/add a ViewController in the AppDelegate like this:
- (void)goToNextPage2 {
self.view2 = [[ViewController2 alloc] init];
view2.view.frame = CGRectMake(769, 0, 768, 1024);
[window addSubview:view2.view];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.5];
view2.view.frame = CGRectMake(0, 0, 768, 1024);
[UIView commitAnimations];
}
How and where do i remove the previous Viewcontroller?
In this case it would be ViewController1.
Any idea?
Thanks in advance
Planky
You didn’t provide much information…
Anyway, that might help.
In your animation code:
And add that to remove the ViewController: