We are using Swift and we made a "UITableViewController" inside our project folder. We are trying to access our "AppDelegate" functions. We have tried using
let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
We have also tried
let appDelegate = UIApplication.sharedApplication()
Any ideas why this is not working?
We also have
let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
inside our "ViewController" and it works there.
The error is " Use of undeclared Type 'AppDelegate' "