Files
swiftapp/swift/Sources/Core/Design/Haptics.swift
T

26 lines
481 B
Swift
Raw Normal View History

2026-04-19 16:26:38 +02:00
import SwiftUI
#if os(iOS)
import UIKit
#endif
enum Haptics {
static func selection() {
#if os(iOS)
UISelectionFeedbackGenerator().selectionChanged()
#endif
}
static func success() {
#if os(iOS)
UINotificationFeedbackGenerator().notificationOccurred(.success)
#endif
}
static func warning() {
#if os(iOS)
UINotificationFeedbackGenerator().notificationOccurred(.warning)
#endif
}
}