Reputation: 2338
I asked this question a while back, but I seem to be having somewhat of the same issue, now with a UIImageView: Vibrancy Effect on UIButton in Interface Builder
What I would like to do is replicate the effect seen in the iOS Photos app on the play icon when looking at a video thumbnail. Here is a screenshot:
As you can see, there seems to be a nested UIVisualEffectView, one with an Extra Light Blur, and one with a Dark Blur and Vibrancy. However, when I try to implement this setup in interface builder I do not get the same result. The part I am struggling with is getting the play arrow to use vibrancy.
The only image I am using is the play arrow, and I have set its rendering mode to Template as the Apple docs say to do.
Any help would be appreciated!
Upvotes: 1
Views: 1101
Reputation: 24248
Made a demo project at
https://github.com/rishi420/VibrancyEffectTest
First I tried with ASCII character used for play. The character is "►". Set it as a button title. It works but not very beautiful.
Then I tried with image. The image has solid color for the middle triangle. Other areas are transparent. It would look like this:
This is how it looks on white background. Simply hide the backgroundImageView in the sample project. I see gray color arrow, can not reproduce "but in this sample project it is just white".
For test, In the middle image there is a transparent (0.5) dark view behind the vibrancy effect view.
Upvotes: 1