【发布时间】:2014-02-11 15:13:50
【问题描述】:
我正在尝试在我的应用程序上设置通用背景图像(具有一些重复的动画效果),该应用程序是为 iOS 6 及更低版本开发的。在 iOS 6 上,为此,我在 AppDelegate 方法中将 UIImageView 作为子视图添加到 self.window 视图。但这似乎在 iOS 7 中不起作用,因为 UIViewControllers 似乎有一个不透明的白色背景,并且它们隐藏了 UIImageView。知道如何在整个应用程序中设置这样的背景吗?
self.animatedBGImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"background_disc.png"]];
[self.window insertSubview: self.animatedBGImage atIndex:0];
self.rotatingBackgroundImage.center = self.window.center;
【问题讨论】:
-
一般来说,我们总是只在
self.window中添加一个rootViewController,并且我们从不打扰UIWindow对象的子视图。
标签: ios iphone objective-c uiimageview