Mercurial > public > geoquiz
diff GeoQuiz/Logic/Haptics.swift @ 0:413e2d21333e
first commit
author | Dennis C. M. <dennis@denniscm.com> |
---|---|
date | Tue, 20 Sep 2022 08:13:26 +0200 |
parents | |
children | 3540c7efc216 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GeoQuiz/Logic/Haptics.swift Tue Sep 20 08:13:26 2022 +0200 @@ -0,0 +1,19 @@ +// +// Haptics.swift +// GeoQuiz +// +// Created by Dennis Concepción Martín on 18/9/22. +// + +import Foundation +import SwiftUI + +func hapticSuccess() { + let generator = UINotificationFeedbackGenerator() + generator.notificationOccurred(.success) +} + +func hapticError() { + let generator = UINotificationFeedbackGenerator() + generator.notificationOccurred(.error) +}