Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(test), userInfo: nil, repeats: true)
In Swift 3, this is the code
func test() { }
but in Swift 4 and Xcode 9 you have to write it like this:
@objc func test() { }
Why is that?