[swift-users] ObjC vs Swift action selectors
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...
More information about the swift-users