// The view controller that was presented by this view controller or its nearest ancestor.
此视图控制器的视图控制器或其最近的祖先。
@property(nullable, nonatomic,readonly) UIViewController *presentedViewController NS_AVAILABLE_IOS(5_0);
// The view controller that presented this view controller (or its farthest ancestor.)
提出了这个视图控制器的视图控制器(或其最远的祖先)。
@property(nullable, nonatomic,readonly) UIViewController *presentingViewController NS_AVAILABLE_IOS(5_0);
[self.presentingViewController.presentingViewController dismissViewControllerAnimated:YES completion:nil];
这句话的意思是找到最远的祖先,dismiss掉。
iOS控制器堆栈是,最叠层的。最初始的画面dismiss掉,子画面也dismiss。