I have a simple app in Swift with just a few views:
- A UIWebView
- some TableViews
- and another view with some data I download from my server
It all works well until when using the app I press the home button, leave there for a while then the iPad goes on sleep mode. A few days later I tap on the app icon and it won't start:
- first tap on the icon will select the icon (goes a little darker) and deselect it a few seconds later
- second tap will launch the LaunchScreen and crash a few seconds later
- double tap the home button and quit the app will sometimes work
I'm just wondering if there is something I need to set on my code to handle idle/long periods of inactivity in something like viewWillDisappear
or other methods?
If so I already have this in all my controllers:
override func viewWillDisappear(animated: Bool) {
timer.invalidate()
webView.removeFromSuperview()
}
Maybe I need to call super.
in there too? or something else I'm missing?