Adds a method to a protocol.
- iOS 4.3+
- macOS 10.7+
- tvOS 9.0+
- watchOS 2.0+
- Objective-C Runtime
The protocol you want to add a method to.
The name of the method you want to add.
A C string representing the signature of the method you want to add.
A Boolean indicating whether the method is a required method of the
true, the method is a required method; if
false, the method is an optional method.
A Boolean indicating whether the method is an instance method. If
true, the method is an instance method; if
false, the method is a class method.
To add a method to a protocol using this function, the protocol must be under construction. That is, you must add any methods to
proto before you register it with the Objective-C runtime (via the