我尝试失败
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];
}
我会尝试这样的东西:
-(void)killPresentingView
{
UIViewController *vc = [self presentingViewController];
[vc dismissViewControllerAnimated:YES completion:nil];
}
看看会发生什么。如果我理解得对的话,这应该行得通。