Class method equivalent of -respondsToSelector:

后端 未结 5 678
说谎
说谎 2020-12-01 13:43

Is there a class method equivalent to -respondsToSelector:?

Something like +respondsToSelector:?

The reason I am asking is because

5条回答
  •  醉梦人生
    2020-12-01 14:27

    Well a class method is just a method of the class object, so you should be able to just do this

    [MyClass respondsToSelector:@selector(...)]
    

提交回复
热议问题