我在timer = NSTimer.scheduledTimerWithTimeInterval(3.0, target: self, selector: "get", userInfo: nil, repeats: true)
FirstVC
和var timer: NSTimer?
课外(我的意思是全球宣布)。
然后我希望timer?.invalidate()
中的applicationDidEnterBackground
或applicationWillResignActive
中的AppDelegate
来电,但它不起作用。
我做错了什么?