开发者

what is use of Formal Protocol Object

开发者 https://www.devze.com 2023-04-10 19:18 出处:网络
We can create protocol object in source code but what is us开发者_运维知识库e of formal Protocol object?

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];
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号