0

Is there a way to create a global UIView as background with the use of a StoryBoard? I am updating my App, and making iOS 5 as the minimum so I can use ARC and also StoryBoards.

However, in my App I used a MainView.xib which I loaded as my rootviewcontroller, and any subsequent view was transparent so the background (and a button/copyright notice) were always visible.

I don't seem to be able to figure out how to do this. I can add the Subview to the rootview controller in the AppDelegate, but as soon as I seque to the next view it is gone.

Any suggestions how this can be done?

4

1 回答 1

0

一种方法是添加一个图像视图作为窗口本身的子视图,并使所有视图控制器的背景清晰。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    UIImageView *iv = [[UIImageView alloc] initWithFrame:self.window.frame];
    iv.image = [UIImage imageNamed:@"BlueGreenGradient.tiff"];
    [self.window addSubview:iv];
    return YES;
}
于 2013-07-16T15:51:39.693 回答