17 lines
453 B
Swift
17 lines
453 B
Swift
import Foundation
|
|
import UIKit
|
|
|
|
public class Haptics {
|
|
public static let shared = Haptics()
|
|
|
|
private init() {}
|
|
|
|
public func play(_ feedbackStyle: UIImpactFeedbackGenerator.FeedbackStyle) {
|
|
UIImpactFeedbackGenerator(style: feedbackStyle).impactOccurred()
|
|
}
|
|
|
|
public func notify(_ feedbackType: UINotificationFeedbackGenerator.FeedbackType) {
|
|
UINotificationFeedbackGenerator().notificationOccurred(feedbackType)
|
|
}
|
|
}
|