add haptics
This commit is contained in:
1 parent
744a243080
commit
0bcd42fbed
2 files changed
+13
No files matched your search
@@ -32,6 +32,7 @@ struct SettingsView: View {
|
||||
|
||||
Section {
|
||||
Button(action: {
|
||||
UIImpactFeedbackGenerator(style: .soft).impactOccurred()
|
||||
UserDefaults.standard.set(false, forKey: "finishedTutorial")
|
||||
}) {
|
||||
Text("Replay Tutorial")
|
||||
@@ -39,12 +40,15 @@ struct SettingsView: View {
|
||||
.buttonStyle(TintedButton(color: .blue, fullwidth: true))
|
||||
|
||||
Button(action: {
|
||||
UIImpactFeedbackGenerator(style: .soft).impactOccurred()
|
||||
do {
|
||||
try PosterBoardManager.clearCache()
|
||||
Haptic.shared.notify(.success)
|
||||
errorAlertTitle = "App Cache Successfully Cleared!"
|
||||
errorAlertDescr = ""
|
||||
showErrorAlert = true
|
||||
} catch {
|
||||
Haptic.shared.notify(.error)
|
||||
errorAlertTitle = "Error"
|
||||
errorAlertDescr = error.localizedDescription
|
||||
showErrorAlert = true
|
||||
|
||||
Reference in new issue
Block a user