What does '+' mean in an Objective-C class name?
I've seen some classes out there like UIImageView+LBBlurredImage,
UIImage+StackBlur or UIImageView+WebCache which have this '+' sign in
common int their names. They are all subclasses of the class described
before de '+' and they all have the same behavior: overriding of the
parent class.
For example, with the class UIImageView+WebCache I use it's method -
(void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage
*)placeholder; as if it were a method of the class UIImageView.
Is this the way to override existing classes? I noticed this peculiarity
in the header file of the class:
@interface UIImageView (WebCache)
What exactly is it called? I couldn't research very deeply for I lacked
the knowledge of what to look for in Google.
No comments:
Post a Comment