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?

Answered by DTS Engineer in 803413022

It seems like you could use attributedTextImageGeneratorFilter in combination with Bill3D's suggestions for attributed string.

Have you made any recent progress on this?

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.

It seems like you could use attributedTextImageGeneratorFilter in combination with Bill3D's suggestions for attributed string.

Have you made any recent progress on this?

Placing text over images
 
 
Q