开发者

Make part of UIImageView transparent

开发者 https://www.devze.com 2023-02-06 20:02 出处:网络
I have an two UIImageView that both have image & they are intersecting. Can 开发者_开发百科I make the intersection part transparent so that tha main background appear?To make the UIImageViews part

I have an two UIImageView that both have image & they are intersecting. Can 开发者_开发百科I make the intersection part transparent so that tha main background appear?


To make the UIImageViews partially transparent:

[imageView1 setAlpha:0.5];
[imageView1 setOpaque:NO];

[imageView2 setAlpha:0.5];
[imageView2 setOpaque:NO];

(See UIView Class Reference)

Or if the images themselves are static, you could open them in an image editor (Gimp, Photoshop), and change the intersecting region to have an alpha value of 0.


Create your images itself as transparent where they are intersecting......

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号