如何在我的iOS7应用程序(如报亭)中获得透明背景,以便我可以看到主屏幕壁纸? [英] How can I get transparent background in my iOS7 app (like Newsstand) so I can see the Home Screen wallpaper?

查看:109
本文介绍了如何在我的iOS7应用程序(如报亭)中获得透明背景,以便我可以看到主屏幕壁纸?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很确定这是直截​​了当的,因为这可能是不可能的。

I'm fairly sure this is going to be straight forward in that it's probably not possible.

基本上,我希望能够轻易看到背景壁纸通过我的视图与新报亭应用程序的方式相同。

Basically, I'd like to be able to lightly see the background wallpaper through my view in the same way that the new Newsstand app does.

我尝试更改视图的Alpha和背景颜色以清除,但都没有这些似乎是这样做的。

I've tried changing the Alpha of the view and the background colour to clear, but neither of these seem to do it.

任何人都很好的想法。

非常感谢,
D。

Many thanks, D.

推荐答案

Appple已删除了在7.0.3中使用此API的功能。多么可惜。

你肯定可以在iOS7中,至少在几天前。在我们的应用程序中,一旦您设置了以下内容,它将使您的背景透明并显示用户壁纸。如果您尝试以编程方式截取屏幕截图,它将只显示黑色。

You certainly can in iOS7, at least as of a few days ago. In our app once you set the following it makes your background transparent and shows the user wallpaper. If you try to programmatically take a screenshot, it will just show black instead.


  1. 设置 UIApplicationIsOpaque 为false

  2. 在app delegate load function中

  1. set UIApplicationIsOpaque to false in the project plist
  2. In the app delegate load function

self.window.backgroundColor = [UIColor clearColor];

self.window.opaque = NO;

将UIViewController.view的背景颜色设置为[UIColor clearColor]

set the UIViewController.view's background color to [UIColor clearColor]

这篇关于如何在我的iOS7应用程序(如报亭)中获得透明背景,以便我可以看到主屏幕壁纸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆