简体   繁体   English

我可以更改iPhone应用程序的黑色背景吗?

[英]can i change the black background of an iphone app?

My app is structured like this, a single MainWindow with window backgroundColor to white(which doesn't appear anywhere anyway), and in this nib i have a UINavigationController which doesn't seems to have a backgroundColor. 我的应用程序的结构是这样的,单个MainWindow的窗口backgroundColor为白色(无论如何都不会出现),在这个笔尖中,我有一个UINavigationController,它似乎没有backgroundColor。 Any view controller is added from code and made from code and they have a gray background. 任何视图控制器都是从代码中添加的,并且是由代码制成的,它们具有灰色背景。 What happens is that when i rotate the iphone and the views are rotating as well, i see a black background under my views. 发生的情况是,当我旋转iphone且视图也在旋转时,我在视图下看到黑色背景。 Can this be changed? 可以更改吗? It looks ugly especially if i have a photo that is rotating in the same time with my gray background. 尤其是当我有一张与灰色背景同时旋转的照片时,这看起来很难看。

You need to use the embedded view in the UINavigationView 您需要在UINavigationView中使用嵌入式视图

When you are your UINavigationview Class : 当您是UINavigationview类时:

self.view.backgroundColor = [UIColor greyColor];

Or any other color you want. 或您想要的任何其他颜色。

在文件“ MainWindow.xib”中更改UIWindowbackgroundColor

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

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