another.im-ios/Monal/another.im/Helpers/Vibration.swift

18 lines
352 B
Swift
Raw Normal View History

2024-11-19 16:07:47 +00:00
import SwiftUI
import UIKit
enum Vibration: String {
case error
case success
public func vibrate() {
switch self {
case .error:
UINotificationFeedbackGenerator().notificationOccurred(.error)
case .success:
UINotificationFeedbackGenerator().notificationOccurred(.success)
}
}
}