<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I’m currently migrating some code to the new #selector syntax and came across an issue re: @objc visibility.<div class=""><br class=""></div><div class="">I have this method:</div><div class=""><br class=""></div><div class=""><font face="Monaco" class=""><span style="font-size: 15px;" class="">@IBAction&nbsp;private&nbsp;func&nbsp;tapGestureRecognized(gesture:&nbsp;UIGestureRecognizer) {…}</span></font></div><div class=""><br class=""></div><div class="">…and use this code to set up the recognizer:</div><div class=""><br class=""></div><div class=""><font face="Monaco" class=""><span style="font-size: 15px;" class="">let&nbsp;tapSelector =&nbsp;#selector(MyClass.tapGestureRecognized(_:))<br class="">let&nbsp;tapGesture =&nbsp;UITapGestureRecognizer(target:&nbsp;self, action: tapSelector)</span></font></div><div class=""><br class=""></div><div class="">The previous version with Selector(“…") worked fine. Now that I use #selector, I get this warning:</div><div class=""><br class=""></div><div class="">Argument of '#selector' refers to a method that is not exposed to Objective-C</div><div class=""><br class=""></div><div class="">My understanding was that @IBAction always implied @objc. I can easily fix the warning, either by adding @objc or by removing the private modifier, but I’d like to understand why @objc @IBAction works, but @IBAction does not. I’d like to keep the private modifier. If this is a bug/limitation, I will file a bug report. Just wanted to make sure that I understand it correctly.</div><div class=""><br class=""></div><div class="">Cheers</div><div class="">Sebastian</div><div class=""><br class=""></div></body></html>