1

I'm trying to get the same color/transparent effect as Apple has used on the bottom borders of table view cells in the today view. How can I also use this effect on for example a UILabel?

How do you get the white transparent effect on a UILabel in a today view widget?

Richard Slater
  • 6,313
  • 4
  • 53
  • 81
Nicklas Ridewing
  • 2,410
  • 2
  • 14
  • 26

1 Answers1

0

I've wondered the same myself. I think They're setting a color of white with 0.4 alpha on the font and a color of black with 0.4 alpha on the background. They overlay the whole thing over a gaussian-blurred and saturated image of what was previously behind the today view.

So the required steps to produce the same effect would be something like the following:
1. Grab background image
2. Blur and saturate image
3. Add below the current view
4. Set black background of 0.4 alpha and white font of 0.4 alpha on the current view.

If you can think of a way to make the background translucent right behind the font that would make the color show more.

Here's an image of what that would look like (including the translucent background behind the text). I did this real quick in photoshop, don't mind the font.enter image description here

Hope this helps!

califrench
  • 429
  • 6
  • 13
  • Hi again, Nicklas. Now that I think about it, Apple may be using something like UIColor(patternImage:blurredImage) with a lighter rendered version of the blurred image as a color. – califrench Apr 14 '15 at 21:22
  • 1
    Thanks for the answer, but this is not a solution for the today view. Maybe my question was't clear. I'm developing a today view widget and need to make the color of the text to match the transparent effect Apple has created ex. for the borders of the table cell. – Nicklas Ridewing Apr 20 '15 at 12:58