Iphone UIModalTransitionStylePartialURL不';我不能回到以前的状态。(不驳回)

Iphone UIModalTransitionStylePartialURL不';我不能回到以前的状态。(不驳回),iphone,objective-c,ios,modalviewcontroller,presentmodalviewcontroller,Iphone,Objective C,Ios,Modalviewcontroller,Presentmodalviewcontroller,我有两个视图控制器,比如A和B。在A中,我调用B以显示转换样式UIModalTransitionStylePartialURL [b setModalTransitionStyle:UIModalTransitionStylePartialCurl]; [self presentModalViewController:b animated:YES]; 它工作得很好。但是,当我在用iOS 4.3编译的程序中按下卷曲区域时。它一点也不排斥。它不会返回到视图控制器 最有趣的是,这个curl是活动的,

我有两个视图控制器,比如A和B。在A中,我调用B以显示转换样式
UIModalTransitionStylePartialURL

[b setModalTransitionStyle:UIModalTransitionStylePartialCurl];
[self presentModalViewController:b animated:YES];
它工作得很好。但是,当我在用iOS 4.3编译的程序中按下卷曲区域时。它一点也不排斥。它不会返回到视图控制器

最有趣的是,这个curl是活动的,并在使用iOS 5.0编译的应用程序中提供响应

如何解决此问题?

此外,为什么它不关闭B视图控制器并返回A呢?

这是苹果网站的链接

基本上,您需要设置委托等,并从viewcontroller A调用dismissModalViewControllerAnimated:method。如果需要进一步的帮助,请告诉我

按三一编辑:

在BController.h文件中,添加以下内容:

@protocol BControllerDelegate <NSObject>
-(void)dismissMe;
@end

@interface BController : UIViewController
//...
@property (assign) id <BControllerDelegate> delegate;
//...
@end
@implementation BController
@synthesize delegate;
//...
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
    [self.delegate dismissMe];
}
#import "BController.h"

@interface AController : UIViewController  <BControllerDelegate>
//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];
}
在AController.h文件中,添加以下内容:

@protocol BControllerDelegate <NSObject>
-(void)dismissMe;
@end

@interface BController : UIViewController
//...
@property (assign) id <BControllerDelegate> delegate;
//...
@end
@implementation BController
@synthesize delegate;
//...
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
    [self.delegate dismissMe];
}
#import "BController.h"

@interface AController : UIViewController  <BControllerDelegate>
//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];
}

显示您的代码。这将有助于我们正确理解并给出所需的答案。实际上根本没有代码。我正在做的就是,上面的代码来自一个视图控制器。我可以向您展示B视图控制器的XIB。我能说的是,这是因为旋度下有一个子视图,所以它不会被触发。但我不明白主要原因。我们为什么需要它?我们使用的是默认转换。实际上,当我的视图为空时,这意味着除了视图之外没有其他控件,它通过单击部分页面卷曲返回到视图控制器。正如你所说的,我需要创建一个委托。但是,如何访问部分页面卷曲,以便了解单击行为?部分页面卷曲是您的父视图。curl下的页面是模态视图。因此,您需要在模态视图和设置委托上放置某种类型的控件,以便它可以进行回调。我认为您也可以直接从模态视图中排除。但是我一直使用委托方法。user523234,你能再解释一下吗?我试着找到这个解决方法,点击卷曲部分来调用模式视图,所以我不需要添加额外的“后退”按钮。但是我找不到任何代码从页面中获取“触地”事件。谢谢你的回复!MiiChiel,查看我更新的答案,包括iOS 4.3的代理回调