if let presentingVC = self?.presentingViewController {
self?.dismissViewControllerAnimated(false, completion: {
presentingVC.dismissViewControllerAnimated(false, completion: nil)
})
}
//這裡的重點是presentingVC是把當下VC給present出來的VC,你也可以看作parentViewController。
而你當前VC所present出來的VC,會叫presentedVC,也可以看作是childrenViewController.
presentingVC ---(present)---> yourViewController ---(present)---> presentedVC
沒有留言:
張貼留言