我想知道如何在UIView上添加玻璃效果
I would like to know how it is possible to add a glass effect on a UIView
我想在灰色半透明视图上类似的效果,您可以在这里看到:
I would like something like this effects on the gray translucent view you can see here :
谢谢
推荐答案UIView中没有玻璃效果。您所能做的就是将视图的不透明度设置在0到1之间。精美的图像集,使其看起来像是玻璃效果。
There's nothing like glass effect in UIView .All you can do is set the opacity of the view between 0 and 1.Also the view shown above has fine set of images which makes it seem like your "Glass Effect".
好吧,如果您将UIView定义为闪亮而优雅,则可以一分为二方式:-
Well If you what your UIView to be "shiny and elegant" , you can do it in two ways :-
1>您可以简单地在用photoshop创建的图像中产生效果,因为这样可以减少编程时的开销。
1>You can simply have effects in images created with photoshop as it will decrease the overhead of doing the same with programming.
2>您可以使用apple提供的core-Graphics库获得它那么您可能必须进入更复杂的绘画世界,并查看获得光泽效果的教程
2>you can have it using core-Graphics library provided by apple then you might have to get into a more complex world of drawing and see the Tutorial to get Gloss Effect
光泽按钮,由Ray wendelich
关于光泽按钮的另一个教程
更多推荐
玻璃效果UIView
发布评论