Added endAlarm function.
This commit is contained in:
@@ -71,10 +71,15 @@ class AlarmActivationViewController: UIViewController
|
|||||||
if let input = puzzleAnswerInput.text {
|
if let input = puzzleAnswerInput.text {
|
||||||
if let numericalInput = Int(input) {
|
if let numericalInput = Int(input) {
|
||||||
if puzzleAnswers.contains(numericalInput) {
|
if puzzleAnswers.contains(numericalInput) {
|
||||||
timer?.invalidate()
|
endAlarm()
|
||||||
print("Alarm solved")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func endAlarm() {
|
||||||
|
timer?.invalidate()
|
||||||
|
print("Alarm solved")
|
||||||
|
dismiss(animated: true, completion: nil)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user