I have a standard SingleViewApplication
project.
ViewController.swift
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
println("viewDidLoad");
}
}
When I start the application, viewDidLoad is called.
My scenario:
- press Home button (applicationDidEnterBackground
)
- recall application (applicationWillEnterForeground
)
and viewDidLoad
is not called.
Is there another func to override?
If you want to call viewWillAppear
in swift use this.
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) // No need for semicolon
}