another.im-ios/ConversationsClassic/UIToolkit/Vibration.swift

18 lines
352 B
Swift
Raw Normal View History

2024-06-27 09:54:12 +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)
}
}
}