Vibrancy Effect on UIButton in Interface Builder

一笑奈何 提交于 2019-11-30 15:31:10

问题


I have some visual effect views with blur and vibrancy in one of my view controllers. I have labels working correctly with vibrancy, but every time i try to add a UIButton to the view, the text appears to be transparent, and the background of the button appears to have vibrancy. I am looking for the effect the "Edit" button has in notification center. I have attached some photos for reference.

What I want:

What is happening:

If there is no way to accomplish this in IB, can it be done with code? I am using Swift.

EDIT

Now here is what happening, it appears with vibrancy, but the text is not dark:


回答1:


You can place your button above the view with vibrancy effect (view must have the same frame as your button).

Take a look:



来源:https://stackoverflow.com/questions/29820444/vibrancy-effect-on-uibutton-in-interface-builder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!