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
24
24
public enum SPAlertHaptic {
25
25
26
26
case success
27
+ case warning
27
28
case error
28
29
case none
29
30
@@ -33,6 +34,8 @@ public enum SPAlertHaptic {
33
34
switch self {
34
35
case . success:
35
36
generator. notificationOccurred ( UINotificationFeedbackGenerator . FeedbackType. success)
37
+ case . warning:
38
+ generator. notificationOccurred ( UINotificationFeedbackGenerator . FeedbackType. warning)
36
39
case . error:
37
40
generator. notificationOccurred ( UINotificationFeedbackGenerator . FeedbackType. error)
38
41
case . none:
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ import UIKit
23
23
24
24
public enum SPAlert {
25
25
26
-
27
26
public static func present( title: String , message: String ? = nil , preset: SPAlertPreset ) {
28
27
let alertView = SPAlertView ( title: title, message: message, preset: preset)
29
28
alertView. present ( )
@@ -34,8 +33,9 @@ public enum SPAlert {
34
33
alertView. present ( )
35
34
}
36
35
37
- public static func present( message: String ) {
36
+ public static func present( message: String , haptic : SPAlertHaptic = . none ) {
38
37
let alertView = SPAlertView ( message: message)
38
+ alertView. haptic = haptic
39
39
alertView. present ( )
40
40
}
41
41
}
You can’t perform that action at this time.
0 commit comments