From 61639292752ea532ea8acec125ce08bf78d11753 Mon Sep 17 00:00:00 2001 From: rainesbt Date: Wed, 10 May 2017 14:58:42 -0400 Subject: [PATCH] Ensure didDisplayAlertClosure called for UIAlertController * didDisplayAlertClosure not being called in the case of using UIAlertView --- Source/Armchair.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Armchair.swift b/Source/Armchair.swift index 129a6be..6418891 100644 --- a/Source/Armchair.swift +++ b/Source/Armchair.swift @@ -1237,7 +1237,10 @@ open class Manager : ArmchairManager { // get the top most controller (= the StoreKit Controller) and dismiss it if let presentingController = UIApplication.shared.keyWindow?.rootViewController { if let topController = topMostViewController(presentingController) { - topController.present(alertView, animated: usesAnimation) { + topController.present(alertView, animated: usesAnimation) { [weak self] _ in + if let closure = self?.didDisplayAlertClosure { + closure() + } print("presentViewController() completed") } }