I’m trying to check for the availability of the UIAppearance class using:
NSClassFromString(@"UIAppearance")
However this returns nil from both iOS4 and iOS5 – anyone got any tips on how to work around this?
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.
UIAppearance is not a class, it is a protocol. So in order to check wether it exists or not, you would use:
It returns null on < iOS5, but an object on iOS5.