another.im-ios/AnotherIM/Helpers/Vibration.swift
2024-10-31 12:43:16 +01: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)
}
}
}