SWIFT ACCESS APPDELEGATE DARI VIEWCONTROLLER
let appDelegate = UIApplication.shared.delegate as! AppDelegate
let aVariable = appDelegate.someVariable
Clumsy Cod
let appDelegate = UIApplication.shared.delegate as! AppDelegate
let aVariable = appDelegate.someVariable
func appDelegate() -> AppDelegate {
return UIApplication.shared.delegate as! AppDelegate
}