File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import UIKit
2424public enum SPAlertHaptic {
2525
2626 case success
27+ case warning
2728 case error
2829 case none
2930
@@ -33,6 +34,8 @@ public enum SPAlertHaptic {
3334 switch self {
3435 case . success:
3536 generator. notificationOccurred ( UINotificationFeedbackGenerator . FeedbackType. success)
37+ case . warning:
38+ generator. notificationOccurred ( UINotificationFeedbackGenerator . FeedbackType. warning)
3639 case . error:
3740 generator. notificationOccurred ( UINotificationFeedbackGenerator . FeedbackType. error)
3841 case . none:
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ import UIKit
2323
2424public enum SPAlert {
2525
26-
2726 public static func present( title: String , message: String ? = nil , preset: SPAlertPreset ) {
2827 let alertView = SPAlertView ( title: title, message: message, preset: preset)
2928 alertView. present ( )
@@ -34,8 +33,9 @@ public enum SPAlert {
3433 alertView. present ( )
3534 }
3635
37- public static func present( message: String ) {
36+ public static func present( message: String , haptic : SPAlertHaptic = . none ) {
3837 let alertView = SPAlertView ( message: message)
38+ alertView. haptic = haptic
3939 alertView. present ( )
4040 }
4141}
You can’t perform that action at this time.
0 commit comments