我将一些数据从viewcontroller&从另一个视图控制器获取它.下面是应用程序委托的代码
class AppDelegate: UIResponder,UIApplicationDelegate { var window: UIWindow? var navigationController: UINavigationController? var mainDic:NSMutableDictionary?
代码设置mainDic
func filterResponse(response:NSDictionary){ var appDelegate=AppDelegate() appDelegate.mainDic=response.mutableCopy() as? NSMutableDictionary }
let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate println(appDelegate.mainDic)
问题是我得到的输出没有.请让我正确.