Does a class name, say UIImage+Something or UIImageView+Somethingelse, mean that it acts like a custom UIImage or UIImageView?
Does a class name, say UIImage+Something or UIImageView+Somethingelse , mean that it acts like
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.
I think you are looking at the file names of Categories, not Classes. The plus character
+is not allowed in class names or any other identifier in Objective-C.An Objective-C category is a way of adding methods (but not instance variables) to a class you don’t necessarily have the source to. For example, if you frequently want to make upside-down copies of UIImages, you can use a category to add a
upsideDownImagemethod onto the UIImage class.It’s common to save this code in a file named
UIImage+UpsideDown.m(with an accompanying header file,UIImage+UpsideDown.h).