UIModalTransitionStylePartialCurl不会回到以前的状态。 (不是解雇)

我有2个视图控制器,让我们说A和B.在A,我打电话B以过渡样式显示UIModalTransitionStylePartialCurl

 [b setModalTransitionStyle:UIModalTransitionStylePartialCurl]; [self presentModalViewController:b animated:YES]; 

它工作正常。 但是,当我按iOS 4.3编译的程序中的curl区域。 它并没有解雇。 它不回到视图控制器…

最有趣的是,这个curl是积极的,并在iOS 5.0编译的应用程序中给予回应。

我该如何解决这个问题?
而且,为什么它不closuresB视图控制器并返回到A?

这里是链接到苹果网站的莫代尔视图控制器

基本上,你需要设置委托等,并从您的viewcontroller调用dismissModalViewControllerAnimated:方法答:让我知道如果您需要进一步的帮助。

按MiiChiel编辑:

在BController.h文件中,添加这个:

 @protocol BControllerDelegate <NSObject> -(void)dismissMe; @end @interface BController : UIViewController //... @property (assign) id <BControllerDelegate> delegate; //... @end 

在BController.m文件中,添加这个:

 @implementation BController @synthesize delegate; //... - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { [self.delegate dismissMe]; } 

在AController.h文件中,添加这个:

 #import "BController.h" @interface AController : UIViewController <BControllerDelegate> 

在AController.m文件中,添加以下内容:

 //add this line before presenting the modal view controller B bController.delegate = self; // assuming bController is the name of the modal -(void)dismissMe { //call back from modal view to dismiss it [self dismissModalViewControllerAnimated:YES]; }