ContainerViewController クラスを作成して、次のようにプッシュできます。
ContainerViewController *containerViewController = [[ContainerViewController alloc] initWithFrontView: YES];
[self.navigationController pushViewController: containerViewController animated: YES];
[containerViewController release];
クラスは次のようになります: (前面ビューまたは背面ビューを上にしてプッシュできるため)
- (id)initWithFrontView: (BOOL) frontViewVisible {
if (self = [super init]) {
frontViewIsVisible = frontViewVisible;
viewA = [[UIView alloc] init];
viewB = [[UIView alloc] init];
if (frontViewIsVisible) {
[self.view addSubview: viewA];
}
else {
[self.view addSubview: viewB];
}
//add a button that responds to @selector(flipCurrentView:)
}
return self;
}
- (void) flipCurrentView: (id) sender {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.75];
[UIView setAnimationDelegate:self];
if (frontViewIsVisible == YES) {
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView: self.view cache:YES];
[viewA removeFromSuperview];
[self.view addSubview: viewB];
} else {
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView: self.view cache:YES];
[viewB removeFromSuperview];
[self.view addSubview: viewA];
}
[UIView commitAnimations];
frontViewIsVisible =! frontViewIsVisible;
}
そして、メモリ管理に注意することを忘れないでください。また、 http://developer.apple.com/library/ios/#samplecode/TheElements/Introduction/Intro.htmlを参照することをお勧めします。これは、まさに探しているものです。