From 0b32a1098a6a7989a37d05c5f47bf15d636e0e7c Mon Sep 17 00:00:00 2001 From: T3rdW Date: Fri, 13 May 2016 18:05:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=862=E4=B8=AA=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E8=AF=AD=E6=B3=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.select 问题 2. ++ 功能,将在swift 3.0被遗弃,更换了+= --- SwiftNotice.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SwiftNotice.swift b/SwiftNotice.swift index d9d856d..6490f4c 100644 --- a/SwiftNotice.swift +++ b/SwiftNotice.swift @@ -121,7 +121,7 @@ class SwiftNotice: NSObject { windows.append(window) if autoClear { - let selector = Selector("hideNotice:") + let selector = #selector(SwiftNotice.hideNotice(_:)) self.performSelector(selector, withObject: window, afterDelay: NSTimeInterval(autoClearTime)) } } @@ -144,7 +144,7 @@ class SwiftNotice: NSObject { dispatch_source_set_event_handler(timer, { () -> Void in let name = imageNames[timerTimes % imageNames.count] iv.image = name - timerTimes++ + timerTimes += 1 }) dispatch_resume(timer) } @@ -237,7 +237,7 @@ class SwiftNotice: NSObject { windows.append(window) if autoClear { - let selector = Selector("hideNotice:") + let selector = #selector(SwiftNotice.hideNotice(_:)) self.performSelector(selector, withObject: window, afterDelay: NSTimeInterval(autoClearTime)) } }