Normally viewDidDisappear is called in my app, because back button was pressed in navigation viewcontroller. But if app is terminated viewDidDisappear is called too. How can I make distinction between the two reason?
Asked
Active
Viewed 26 times
1
János
- 29,667
- 30
- 151
- 300
-
I am not sure whether it's possible to determine inside of the controller, but you can set some flag in 'UserDefaults' for example, then check it in 'AppDelegate', 'func applicationWillTerminate(_ application: UIApplication)' – T. Pasichnyk Sep 12 '17 at 11:51