开发者

iPhone: I call protocol_conformsToProtocol function and it shows implicit declaration warning

开发者 https://www.devze.com 2023-02-11 08:11 出处:网络
I got 2 Protocol* object and want to check if they conform each other. I use BOOL protocol_conform开发者_StackOverflowsToProtocol(Protocol *proto, Protocol *other)

I got 2 Protocol* object and want to check if they conform each other.

I use

BOOL protocol_conform开发者_StackOverflowsToProtocol(Protocol *proto, Protocol *other)

but it shows a warning

Implicit declaration of function 'protocol_conformsToProtocol'

What do I miss?


Are you including the right headers? I think protocol_conformsToProtocol is declared in <objc/runtime.h>.

#include <objc/runtime.h>
0

精彩评论

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