简体   繁体   中英

How can I change the background image view transparency image?

It is the code:

self.view.backgroundColor= [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"yourimage.png"]];

My "yourimage.png" have some space that is transparency. But it shows me it becomes black. How can I change it to show the transparency instead of black color? thz.

将视图上的opaque属性设置为NO

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM