iOS模态跳转返回到第二级页面或某一级页面

UIViewController *vc = self.presentingViewController;

    while (vc.presentingViewController) {

    vc = vc.presentingViewController;

    }

    [vc.presentedViewController dismissViewControllerAnimated:YES completion:NULL];



当然返回第三级页面就是[vc.presentedViewController.presentedViewController dismissViewControllerAnimated:YES completion:NULL];

你可能感兴趣的:(iOS模态跳转返回到第二级页面或某一级页面)