Calling popToRootViewControllerAnimated after dismissModalViewControllerAnimated

前端 未结 4 1441
孤独总比滥情好
孤独总比滥情好 2021-01-05 14:04

I am working application in which i calling presentModalViewController and once finished(calling dismissModalViewControllerAnimated:YES) it should

4条回答
  •  清酒与你
    2021-01-05 15:01

    If you have a navigation controller with a stack of UIViewControllers:

    [self dismissModalViewControllerAnimated:YES];
    [(UINavigationController*)self.parentViewController popToRootViewControllerAnimated:YES];
    //UIViewController *vc = [[UIViewController new] autorelease];
    //[(UINavigationController*)self.parentViewController pushViewController:vc animated:YES];
    

    Assumes, that view controller in which called modal view controller has navigationController.

提交回复
热议问题