diff --git a/PooTools.podspec b/PooTools.podspec index 061a904b..5fc04795 100644 --- a/PooTools.podspec +++ b/PooTools.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'PooTools' - s.version = '3.64.11' + s.version = '3.64.12' s.author = { 'crazypoo' => '273277355@qq.com' } s.homepage = 'http://crazypoo.github.io/PTools/' s.summary = '多年来积累的轮子' diff --git a/PooToolsSource/ActionsheetAndAlert/PTAlertTips.swift b/PooToolsSource/ActionsheetAndAlert/PTAlertTips.swift index 9e288a40..36a90877 100644 --- a/PooToolsSource/ActionsheetAndAlert/PTAlertTips.swift +++ b/PooToolsSource/ActionsheetAndAlert/PTAlertTips.swift @@ -26,21 +26,21 @@ public enum PTAlertTipControl { view.present(on: window, completion: completion) } - public static func present(title: String? = nil, subtitle: String? = nil, icon: PTAlertTipsIcon? = nil, style: PTAlertTipsStyle, haptic: PTAlertTipsHaptic? = nil) { + public static func present(title: String? = nil, subtitle: String? = nil, icon: PTAlertTipsIcon? = nil, style: PTAlertTipsStyle, haptic: PTAlertTipsHaptic? = nil,dismiss:PTActionTask? = nil) { switch style { #if os(iOS) case .Normal: guard let window = UIApplication.shared.windows.filter({ $0.isKeyWindow }).first else { return } let view = PTAlertTipsLow(title: title, subtitle: subtitle, icon: icon) view.haptic = haptic - view.present(on: window) + view.present(on: window,completion: dismiss) #endif #if os(iOS) || os(visionOS) case .SupportVisionOS: guard let window = UIApplication.shared.windows.filter({ $0.isKeyWindow }).first else { return } let view = PTAlertTipsHight(title: title, subtitle: subtitle, icon: icon) view.haptic = haptic - view.present(on: window) + view.present(on: window,completion: dismiss) #endif } }