如何关闭我用“替换”segue打开的视图控制器

时间:2013-08-06 19:45:40

标签: ios storyboard segue uistoryboardsegue

我尝试失败了:

1. [self dismissViewControllerAnimated:YES completion:Nil];



 2. [[self parentViewController] dismissViewControllerAnimated:YES
    completion:Nil];



 3. //from the parent view controller using a delegate 
        -(void)closeReplaceController
        {
            DLog(@"closeReplaceController");
            [self dismissViewControllerAnimated:YES completion:Nil];

        }

1 个答案:

答案 0 :(得分:1)

我会尝试这样的事情:

-(void)killPresentingView
{
    UIViewController *vc = [self presentingViewController];
    [vc dismissViewControllerAnimated:YES completion:nil];
}

看看会发生什么。如果我理解你,这应该有效。