// The view controller that presented this view controller (or its farthest ancestor.)
@property ( nonatomic , readonly ) UIViewController *presentingViewController NS_AVAILABLE_IOS ( 5 _0);
@property ( nonatomic , readonly ) UIViewController *presentingViewController NS_AVAILABLE_IOS ( 5 _0);
a
present b,b
present c 。 现在要从c中直接回到a
if
([
self
respondsToSelector
:
@selector
(presentingViewController)]) {
[ self . presentingViewController dismissViewControllerAnimated : YES completion : NULL ];
}
[ self . presentingViewController dismissViewControllerAnimated : YES completion : NULL ];
}