2

Is there a way to somehow affect the color of a label which is under vibrancy effect or at least bring some contrast by setting some tint/alpha/background/whatever properties? As you can see below, in my case the vibrancy created almost unreadable text...

enter image description here

frangulyan
  • 3,580
  • 4
  • 36
  • 64
  • At least OS X has something I want for iOS, according to their HIG https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/ColorTypography.html#//apple_ref/doc/uid/20000957-CH13-SW1 – frangulyan Sep 30 '15 at 01:43
  • have you tired choosing different blur-styles for the blurred layer and for the vibrancy? I had the same problem and I set the vibrancy _extra light_, the blurred layer was _light_ only; and I had no issue with the texts' readability. – holex Jan 09 '17 at 14:32

3 Answers3

0

Yes u can. To render vibrant text, create a UILabel and add it to the vibrancy UIVisualEffectView's contentView. The color of the UILabel does not affect its appearance.

Go through the following link for demo project. https://github.com/ide/UIVisualEffects

  • I already created a vibrant text, the problem was that it is almost unreadable, as you can see in the image above. I wanted to fix that. – frangulyan Sep 30 '15 at 07:49
0

When I went through 2014 WWDC video I found at least some way to affect the appearance of the vibrancy. You can set the background color of the original blur view's contentView like this:

blurView.contentView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.01];

which will unfortunately also affect the whole blur (by tinting) on which the vibrancy was based. But at least the text is much more readable after that.

frangulyan
  • 3,580
  • 4
  • 36
  • 64
0

I don't think that what you're asking for is doable, but I had a similar problem and this link helped me improve my design.