首页 > 代码库 > UIViewController 的属性presentingViewController

UIViewController 的属性presentingViewController

// The view controller that presented this view controller (or its farthest ancestor.)
@property(nonatomic,readonlyUIViewController *presentingViewController NS_AVAILABLE_IOS(5_0);

present b,b present c   。 现在要从c中直接回到a

if ([self respondsToSelector:@selector(presentingViewController)]) {
        [
self.presentingViewController dismissViewControllerAnimated:YES completion:NULL];

    }

UIViewController 的属性presentingViewController