comparison GeoQuiz/Controllers/HapticsController.swift @ 29:f5a2c2dab208

fix files structure
author Dennis C. M. <dennis@denniscm.com>
date Thu, 10 Nov 2022 10:27:28 +0100
parents GeoQuiz/Models/Controllers/HapticsController.swift@425078c01194
children
comparison
equal deleted inserted replaced
28:f51b70c2cccc 29:f5a2c2dab208
1 //
2 // HapticsController.swift
3 // GeoQuiz
4 //
5 // Created by Dennis Concepción Martín on 18/9/22.
6 //
7
8 import Foundation
9 import SwiftUI
10
11 class HapticsController {
12 private var user = UserController()
13
14 func success() {
15 if user.data.haptics {
16 let generator = UINotificationFeedbackGenerator()
17 generator.notificationOccurred(.success)
18 }
19 }
20
21 func error() {
22 if user.data.haptics {
23 let generator = UINotificationFeedbackGenerator()
24 generator.notificationOccurred(.error)
25 }
26 }
27 }