UIImageView inside UIVisualEffectView - vibrancy not applied

669 Views Asked by At

I'm currently designing a custom view class, such that:

  • it is placed upon some contents, blurring them
  • it contains some images and labels and vibrancy effect should be applied to them

So the following hierarchy is built in Interface Builder:

enter image description here

Both the Visual Effect Views are placed using Visual Effect Views with Blur and Vibrancy in Xcode object library, and a UILabel and an UIImageView are placed inside contentView of the second Visual Effect View.

Problem is that the vibrancy effect is not applied to both contents, only UILabel has vibrancy, UIImageView is not, such as the following screenshot.

enter image description here

Is there some additional settings I missed, or the vibrancy effect provided by Apple is only available for UILabel?

1

There are 1 best solutions below

1
On

The vibrancy effect only works for views that obey the tintColor. If you want your image view to have vibrancy, you must be using a template image.