So, object typecasting in Objective C isn’t a good practice (isn’t a good design), and have to be use only if it’s really needed .
TRUE or FALSE ?
So, object typecasting in Objective C isn’t a good practice (isn’t a good design),
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.
Typecasting objective c objects does not work at all, because there is no overloading of the cast operator as in c++.
So basically you can only safely typecast object which have common superclasses e.g. NSMutableString and NSString etc.
But you don’t need to do this.
In general no need to typecast objc objects.