Skip to content

Commit

Permalink
优化一些辣鸡功能
Browse files Browse the repository at this point in the history
  • Loading branch information
crazypoo committed Oct 17, 2024
1 parent 3ea86ba commit 6ed2151
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion PooTools.podspec
Original file line number Diff line number Diff line change
@@ -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 = '多年来积累的轮子'
Expand Down
6 changes: 3 additions & 3 deletions PooToolsSource/ActionsheetAndAlert/PTAlertTips.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 6ed2151

Please sign in to comment.