mirror of
https://github.com/UrbanApps/Armchair.git
synced 2026-07-15 09:12:50 +02:00
Ensure didDisplayAlertClosure called for UIAlertController
* didDisplayAlertClosure not being called in the case of using UIAlertView
This commit is contained in:
@@ -1237,7 +1237,10 @@ open class Manager : ArmchairManager {
|
|||||||
// get the top most controller (= the StoreKit Controller) and dismiss it
|
// get the top most controller (= the StoreKit Controller) and dismiss it
|
||||||
if let presentingController = UIApplication.shared.keyWindow?.rootViewController {
|
if let presentingController = UIApplication.shared.keyWindow?.rootViewController {
|
||||||
if let topController = topMostViewController(presentingController) {
|
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")
|
print("presentViewController() completed")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user