Update:
You will be happy to know that as of Swift 2.2 and Xcode 7.3, it can now warn when there is no method declaration for the defined selector. There is new syntax introduced. No longer shall we define selectors as "myMethodToCall:"
or Selector("myMethodToCall:")
. Define them like so:
#selector(ViewController.myMethodToCall(_:))
//or without a parameter
#selector(ViewController.myMethodToCall)
Xcode will offer to convert your existing selectors to this new syntax. Cheers!
Original:
There is no way to create a selector in Xcode 7.2 that would cause a warning to be shown in the case the provided function name does not exist. We still need to use the Selector
struct with the 'stringy' function name.
On performSelector:
The API you're speaking of is the performSelector
APIs. You can use it like so:
self.performSelector("functionName")
//or
self.performSelector(Selector("functionName"))