如何创建非动画展开自定义segue

时间:2014-02-18 06:15:38

标签: ios uistoryboard uistoryboardsegue

我有从控制器A到B的自定义转换,它只是像这样定义

@implementation Mycustomsegue
-(void)perform {
    [[self sourceViewController] presentViewController:[self destinationViewController] animated:NO completion:^{
    }];
}
@end

现在,当从B向A展开时,它看起来像是模式解除控制器B.如何删除它?我不想要任何动画或我想控制它。

1 个答案:

答案 0 :(得分:2)

创建简单的操作方法并将其连接到故事板。

尝试以下代码

- (IBAction)actionDismiss:(id)sender {

[self dismissViewControllerAnimated:NO completion:nil];

}

选择segue和goto属性检查器
在这种情况下设置自定义类名“ Mycustomsegue

enter image description here