When I kill my iPhone app and relaunch it I have an image of the app\'s previous state instead of the launch image. How can I force iOS to always show the launch image?
Swift 4.2
func applicationDidEnterBackground(_ application: UIApplication) {
let imageView = UIImageView(frame: self.window!.bounds)
imageView.tag = 25
imageView.image = UIImage(named: )
UIApplication.shared.keyWindow?.subviews.last?.addSubview(imageView)
}
func applicationWillEnterForeground(_ application: UIApplication) {
if let imageView : UIImageView = UIApplication.shared.keyWindow?.subviews.last?.viewWithTag(25) as? UIImageView {
imageView.removeFromSuperview()
}
}