草庐IT

checkForChangesInPasteboard

全部标签

swift - NSTimer 不会调用私有(private)函数作为选择器

我正在研究要点:PasteboardWatcher.swift我在其中调用了一个NSTimer对象,如下所示:funcstartPolling(){//setupandstartoftimertimer=NSTimer.scheduledTimerWithTimeInterval(2,target:self,selector:Selector("checkForChangesInPasteboard"),userInfo:nil,repeats:true)}checkForChangesInPasteboard函数的定义是:funccheckForChangesInPasteboard