I ran into the same problem trying to add a non-gray shadow to the UIButton titleLabel . The solution is to set the properties of the layer button instead:
button.titleLabel.layer.shadowColor = [UIColor whiteColor].CGColor; button.titleLabel.layer.shadowOffset = CGSizeMake(0, 1); button.titleLabel.layer.shadowOpacity = 1; button.titleLabel.layer.shadowRadius = 0;
shadowOpacity necessary for the effect to appear at all, and shadowRadius must be set explicitly, since the default is 3.0 (very blurry).
This solution requires #import <QuartzCore/QuartzCore.h> .
source share