I am new to Xcode. I want to know how can I know all classes conform to certain protocol in Xcode 4.3.1?
And how can I know all subclasses of one class?
I am new to Xcode. I want to know how can I know all
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the Objective-C runtime functions.
objc_getClassListto get the list ofClassesclass_getSuperclassor the-superclassmethod to walk the superclass chainclass_conformsToProtocolor the-conformsToProtocol:method to check if a class conforms to a protocol