简体   繁体   English

如何使UIWindow透明化

[英]How to make UIWindow transparent

I need to see the HomeScreen from the UIWindow by making the UIWindow background as transparent. 我需要通过使UIWindow背景透明来从UIWindow看到HomeScreen How to achieve this ? 怎么做到这一点?

I have tried with [UIColor ClearColor]; 我试过[UIColor ClearColor]; But its displaying BlackColor only. 但它只显示BlackColor。

It's not possible to see the homescreen inside your app. 您无法在应用内看到主屏幕。 Apple did this to save power (who needs to render the homescreen while he's using an app) and to prevent devs from irritating users by making them think they are on their homescreen. Apple这样做是为了节省电力(他在使用应用程序时需要渲染主屏幕),并通过让用户认为他们在主屏幕上来防止用户烦恼。

这是不好的,但它必要,然后我认为你使用像下面可能是用户的

self.window.backgroundColor = [UIColor colorWithRed:55.0f green:55.0f blue:55.0 alpha:0.05];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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