I'm trying to give a label in one of the classes in my app a drop shadow, but it's not working at all. Nothing shows up. What am I doing wrong?
// Set label properties
titleLabel.font = [UIFont boldSystemFontOfSize:TITLE_FONT_SIZE];
titleLabel.adjustsFontSizeToFitWidth = NO;
titleLabel.opaque = YES;
titleLabel.backgroundColor = [UIColor clearColor];
titleLabel.textColor = titleLabelColor;
titleLabel.shadowColor = [UIColor blackColor];
titleLabel.shadowOffset = CGSizeMake(10, 10);
It's just white, no shadow.
Just Add this line to before adding titleLabel to self.view
titleLabel.layer.masksToBounds = NO;
Good Luck !!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With