玻璃效果UIView

编程入门 行业动态 更新时间:2024-10-19 04:25:14
本文介绍了玻璃效果UIView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想知道如何在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

本文发布于:2023-11-11 05:56:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1577569.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:效果   玻璃   UIView

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!