IBAction methods declared in the protocol are not visible in Interface Builder

I defined an objective-c protocol that declares a method marked with IBAction. I have implemented a UIViewController that implements a protocol.

In the Builder interface, I created a nib file with a UIViewController as the owner of the file. However, the protocol method does not appear in the Received Actions section, although it is marked as IBAction.

I assume the protocol methods are not visible in Interface Builder. It's right? Thank.

+3
source share
1 answer

IBAction- this is only an operator #define; this tag is not inherited when implementing the protocol.

IBAction, .

+2

Source: https://habr.com/ru/post/1732546/


All Articles