mirror of
https://github.com/home-assistant/iOS.git
synced 2026-04-12 14:30:51 -05:00
21 lines
528 B
Swift
21 lines
528 B
Swift
#if os(iOS)
|
|
import Foundation
|
|
import UIKit
|
|
|
|
public protocol ImpactFeedbackGeneratorProtocol {
|
|
func impactOccurred()
|
|
func impactOccurred(style: UIImpactFeedbackGenerator.FeedbackStyle)
|
|
}
|
|
|
|
final class ImpactFeedbackGenerator: ImpactFeedbackGeneratorProtocol {
|
|
func impactOccurred() {
|
|
impactOccurred(style: .medium)
|
|
}
|
|
|
|
func impactOccurred(style: UIImpactFeedbackGenerator.FeedbackStyle) {
|
|
let generator = UIImpactFeedbackGenerator(style: style)
|
|
generator.impactOccurred()
|
|
}
|
|
}
|
|
#endif
|