diff --git a/Library/PMAlertAction.swift b/Library/PMAlertAction.swift index cb70647..539b37a 100644 --- a/Library/PMAlertAction.swift +++ b/Library/PMAlertAction.swift @@ -47,7 +47,10 @@ import UIKit } @objc func tapped(_ sender: PMAlertAction) { - self.action?() + //Action need to be fired after alert dismiss + DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { + self.action?() + } } @objc fileprivate func addSeparator(){ diff --git a/Library/PMAlertController.swift b/Library/PMAlertController.swift index a6e90be..f2b8e4a 100755 --- a/Library/PMAlertController.swift +++ b/Library/PMAlertController.swift @@ -90,7 +90,6 @@ import UIKit } alertAction.addTarget(self, action: #selector(PMAlertController.dismissAlertController(_:)), for: .touchUpInside) - } @objc fileprivate func dismissAlertController(_ sender: PMAlertAction){ diff --git a/PMAlertController.xcodeproj/project.pbxproj b/PMAlertController.xcodeproj/project.pbxproj index 2f8530f..fbc8b5a 100755 --- a/PMAlertController.xcodeproj/project.pbxproj +++ b/PMAlertController.xcodeproj/project.pbxproj @@ -273,6 +273,7 @@ 453B4ED51CDE3F0A00BFB901 = { CreatedOnToolsVersion = 7.3; LastSwiftMigration = 0900; + ProvisioningStyle = Manual; }; 453B4EE91CDE3F0A00BFB901 = { CreatedOnToolsVersion = 7.3; @@ -525,10 +526,13 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = PMAlertController/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.codeido.PMAlertControllerSample; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.0; }; @@ -539,10 +543,13 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = PMAlertController/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.codeido.PMAlertControllerSample; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.0;