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)) } }