From 85a84dc5551d2182d69eff75b1efc2843c47dba5 Mon Sep 17 00:00:00 2001 From: xuhui Date: Fri, 19 Aug 2016 15:23:33 +0800 Subject: [PATCH] fix the alert can not be showed when the frontmost viewController is begin dissmissed --- PSTAlertController/PSTAlertController.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PSTAlertController/PSTAlertController.m b/PSTAlertController/PSTAlertController.m index 489a75f..f1d23b0 100644 --- a/PSTAlertController/PSTAlertController.m +++ b/PSTAlertController/PSTAlertController.m @@ -287,6 +287,9 @@ - (void)showWithSender:(id)sender arrowDirection:(UIPopoverArrowDirection)arrowD // Use the frontmost viewController for presentation. while (controller.presentedViewController) { + if([controller.presentedViewController isBeingDismissed]) { + break; + } controller = controller.presentedViewController; }