Is is possible in Objective-c runtime to get an array of all subclasses of UIView class?
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.
Here’s the code that prints names of all UIView subclasses: (How to get list of all classes available at runtime can be found here). Note also that this code will print only direct
UIViewsubclasses, if you want to go further down the hierarchy you’ll probably need to call listed code recursively with desired superclass as a parameter.