We can create protocol object in source code but what is us开发者_运维知识库e of formal Protocol object?
Protocol *myObj = @protocol(protocolName);
You can use it to check if an object conforms to a protocol.
[anotherObject conformsToProtocol:myObj];
We can create protocol object in source code but what is us开发者_运维知识库e of formal Protocol object?
Protocol *myObj = @protocol(protocolName);
You can use it to check if an object conforms to a protocol.
[anotherObject conformsToProtocol:myObj];
精彩评论