I\'m trying to create an NSTimer in Swift but I\'m having some trouble.
NSTimer
Swift
NSTimer(timeInterval: 1, target: self, selector: test(), us
For swift 3
let timer = Timer.scheduledTimer(timeInterval: 0.01, target: self, selector: #selector(self.test), userInfo: nil, repeats: true)
Function declaration In same class:
@objc func test() { // my function }