I am trying to create a custom UILabel which sets the background colour to clearColor (with added functionality further down the line). This way, I don't have to specify the exact properties for each label as they will be inherent in every instance of the label.
I have tried several variations on a them but with no success, what am I doing wrong?
@interface ABClearLabel : UILabel {
}
@end
and
@implementation ABClearLabel
- (id)init {
if (self = [super init]) {
self.backgroundColor = [UIColor clearColor];
}
}
Unfortunately, this does not work (I have set the label type in IB as ABClearLabel, as have the instance variables and @property declarations). Please help.