I\'ve been using selectors for a while, and even after migrating to Swift I was able to use them without issues. That\'s how I was using on Swift 2 without issues until I up
On Swift 4 I had to add @objc before the func to get rid of the warnings.
This is how I call the func with NSTimer:
Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(ViewController.intro), userInfo: nil, repeats: false)
This is how the func is declared:
@objc func intro () {
// do your stuff here
}
I also updated the setting as the Xcode requested:
No more warnings, everything seems to be working fine.