[swift-users] ObjC vs Swift action selectors

Joe Groff jgroff at apple.com
Tue Dec 6 14:55:03 CST 2016

> On Dec 6, 2016, at 12:53 PM, David Catmull <davidcatmull at gmail.com> wrote:
> I tried, writing that as @objc(action:) #selector(ClassName.action(_:)) but that got an "expected declaration" error.
> I also tried adding @objc(action:) to the method itself (which seems redundant anyway), but that didn't help either.

The attribute has to go on the method definition. Would you be able to file a bug on bugs.swift.org <http://bugs.swift.org/> with your Swift and ObjC code?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20161206/d0a103aa/attachment.html>

More information about the swift-users mailing list