문제

Objective-C category can implement a protocol. Is the reverse true - can an Objective-C protocol have category?

도움이 되었습니까?

해결책

No.

A protocol can have @required and @optional methods, which is similar from a compiler point of view (category methods aren't verified by the compiler in the same way normally defined and continuation category methods are).

Protocols can also extend other protocols. For instance, almost any protocol you define yourself should extend <NSObject>.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top