Selector
在Swift4中,
self.timer = Timer.scheduledTimer(timeInterval: 0.1, target: self, selector: #selector(self.updateTimer), userInfo: nil, repeats: true)
Warnning:Argument of '#selector' refers to instance method 'updateTimer()' that is not exposed to Objective-C
Add '@objc' to expose this instance method to Objective-C
处理方法:
@objc func updateTimer() {
// ...
}
提高技能如同提升自信心。