diff --git a/Sources/UIKitNavigationShim/shim.m b/Sources/UIKitNavigationShim/shim.m index 4ad540c4c..e473be6e5 100644 --- a/Sources/UIKitNavigationShim/shim.m +++ b/Sources/UIKitNavigationShim/shim.m @@ -51,8 +51,15 @@ - (void)UIKitNavigation_viewDidDisappear:(BOOL)animated { [self UIKitNavigation_viewDidDisappear:animated]; if ((self.isBeingDismissed || self.isMovingFromParentViewController) && self.onDismiss != NULL) { - self.onDismiss(); - self.onDismiss = nil; + if ([self isKindOfClass:UIAlertController.class]) { + dispatch_async(dispatch_get_main_queue(), ^{ + self.onDismiss(); + self.onDismiss = nil; + }); + } else { + self.onDismiss(); + self.onDismiss = nil; + } } }