Question: what is nstimer in swift?
Answer: NSTimer has been renamed to Timer in Swift 4.2. this syntax will work in 4.2: let timer = Timer. scheduledTimer(timeInterval: 1. 0, target: self, selector: #selector(UIMenuController. update), userInfo: nil, repeats: true)