I’ve creating a Label with a shadow:
#define TITLE_FONT_SIZE 22.0f
titleLabel.textColor = [UIColor whiteColor];
titleLabel.textAlignment = UITextAlignmentCenter;
titleLabel.font = [UIFont boldSystemFontOfSize:TITLE_FONT_SIZE];
titleLabel.layer.shadowOpacity = 1.0;
titleLabel.layer.shadowRadius = 4.0;
titleLabel.layer.shadowColor = [UIColor blackColor].CGColor;
titleLabel.layer.shadowOffset = CGSizeMake(0.0, 0.0);
The label is on a crossfading image background.
Because of the white, sometimes it’s hard to read on lighter backgrounds. And the more I increase the radius, the less dark it gets….
Is it possible to make the shadow darker or make the label ‘pop-out’ more?
Any other advice that would help?
What I’ve done to solve the same problem is use two labels stacked on top of each other. The top label is the regular text color – white in your case. The bottom label is offset one or two pixels and it’s text color and shadow color are set to the same value – black in your case. This gives at least a sharp shadow directly beneath the main label and still lets it soften for a nice shadow effect.