I want my app to have the ability to run my pause function when the user clicks home. When I exit the app, it pauses, but then runs the view did load function when I enter the app again. Does anyone know how to have the view did load function only run the first time the view loads before it is termitated?
Here is my pause function:
func pauseGame322() {
ThreeTime = 3
CountdownUntillGameLabel.text = String(ThreeTime)
if PlayButton.isHidden == true &&
ContinueButton.isHidden == true{
timer.invalidate()
timer10.invalidate()
TotalSecondsForPause.isHidden = false
PauseView.isHidden = false
UnpauseButton.isHidden = false
TotalSecondsForPause.text = String(time)
}
}