[swift-users] Swift 3 likes to tease me
Gerriet M. Denkmann
g at mdenkmann.de
Thu Sep 22 23:51:44 CDT 2016
This line (Swift 3):
if a.responds(to: Selector(“viewControllers") )
creates this warning: Use '#selector' instead of explicitly constructing a 'Selector'
Ok. Following this advice I change it to:
if a.responds(to: #selector(“viewControllers"))
and now get an error instead: Argument of ‘#selector' does not refer to an '@objc' method, property, or initializer
Why do I get punished for following Xcode’s advice?
Gerriet.
More information about the swift-users
mailing list