I must change a view. In a view I've a button with this code:
FormazioneViewController *formazioneC = [[FormazioneViewController alloc] initWithNibName:@"FormazioneView" bundle:nil];
self.formazioneViewController= formazioneC;
[UIView beginAnimations:@"View Flip" context:nil];
[UIView setAnimationDuration:1.25];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationDidStop)];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES];
[self viewWillDisappear:YES];
[self viewDidDisappear:YES];
[self.view addSubview:formazioneViewController.view];
[formazioneViewController viewWillAppear:YES];
[formazioneViewController viewDidAppear:YES];
[UIView commitAnimations];
and I add a superview, now i must return in this view and i use a button with this code:
[UIView beginAnimations:@"View Flip" context:nil];
[UIView setAnimationDuration:1.25];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationDidStop)];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES];
[self viewWillDisappear:YES];
[self viewDidDisappear:YES];
[self.view removeFromSuperview];
[****** viewWillAppear:YES];
[****** viewDidAppear:YES];
[UIView commitAnimations];
What is the object where i must call the viewWillAppear and ViewDidAppear method?? Thanks
Sorry for my bad english!