使用页面卷曲关闭modalviewcontroller

Nic*_*ick 5 iphone model-view-controller curl

我试图解散一个页面卷曲的modalviewcontroller.curl工作正常,但我似乎无法在modalviewcontroller下显示tableview.modalviewcontroller的图像仍然在卷曲的页面下.如果我在动画结束前关闭modalviewcontoller,则动画不会显示.这是我的代码:

//hide splash screen
- (void)hideSplash{
 [UIView beginAnimations:nil context:nil];
 //change to set the time
 [UIView setAnimationDuration:2];
 [UIView setAnimationBeginsFromCurrentState:YES];
 [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:modelView cache:NO];
 // do your view swapping here

 //[[self modalViewController] dismissModalViewControllerAnimated:NO];

 [UIView commitAnimations];
//[self.view  sendSubviewToBack:self.view]; 

}
Run Code Online (Sandbox Code Playgroud)

希望有人可以帮忙!干杯尼克

Pet*_*ese 4

在iOS4中:

介绍一下,它是这样的:

[containerView addSubview:modelView];
[UIView transitionWithView:containerView
                  duration:.75
                   UIViewAnimationOptionTransitionCurlUp
                animations:^{}
                completion:^(BOOL finished) {
                    NSLog(@"finished %d", finished);
                }];
Run Code Online (Sandbox Code Playgroud)

要驳回,请使用UIViewAnimationOptionTransitionCurlDown.