Placing text over images

What is the best way to display text over images - I'd like the image to fade to white underneath the text so that the text is easier to read since I have no control over the contents of the images.

I thought about having a second label behind the actual label with the same text in a slightly larger font and white color. but I'd rather have it be a gradual fading of the image just under the text rather than what looks like 3D text.

Any suggestions?

You can use attributes in NSAttributedString to stroke the text and help it pop out from an image. If you resize the text and overlay it, it won't line up with each character Which can be used to some effect. But you can also stack labels of the same font size with different attributes to help create more contrast as well.

Consider textImageGeneratorFilter a filter that renders text that you can apply to an image.

Placing text over images
 
 
Q