Swift3.0 在其它类获取Appdelegate单例的属性或则对象的值
// 获取Appdelegate let myAppdelegate = UIApplication.shared.delegate as! AppDelegate // 获取Appdelegate的熟悉 if myAppdelegate.xxxxx != nil { xxxxx = myAppdelegate.xxxxx }
// 获取Appdelegate let myAppdelegate = UIApplication.shared.delegate as! AppDelegate // 获取Appdelegate的熟悉 if myAppdelegate.xxxxx != nil { xxxxx = myAppdelegate.xxxxx }