another.im-ios/ConversationsClassic/View/UIToolkit/Vibration.swift
2024-06-27 11:54:12 +02:00

18 lines
352 B
Swift

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)
}
}
}