I\'m trying to add a 1px black drop shadow to a button label with no luck. I\'ve tried this:self.setTitleShadowOffset = CGSizeMake(0, -1);
but I get:
Here is how to add shadow to the button title in Objective-C with radius property:
#import
button.titleLabel.layer.shadowOffset = CGSizeMake(2.0, 2.0);
button.titleLabel.layer.shadowColor = [UIColor colorWithWhite:0.1 alpha:0.7].CGColor;
button.titleLabel.layer.shadowRadius = 2.0;
button.titleLabel.layer.shadowOpacity = 1.0;
button.titleLabel.layer.masksToBounds = NO;