1

我目前正在构建一个通用应用程序。

用户点击按钮后,我以以下方式在模态视图中显示一些设置:

viewCtrl.modalPresentationStyle = UIModalPresentationFullScreen;
viewCtrl.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:viewCtrl animated:YES];

在 iPhone 和 iPad 上,Transitionsstyles 看起来是一样的。现在的问题是,在 iPad 上,倾斜视图的背景是白色的。这个白色的背景看起来很丑。在 iPhone 上,它应该是黑色的。

我还尝试将黑色背景视图添加到我的 [UIApplication 窗口]

UIView *bgView = [[UIView alloc] init];
[bgView setBackgroundColor:[UIColor blackColor]];
[window addSubview:bgView];

但这并没有什么不同。

4

1 回答 1

1

我认为这就像将 UIWindow 背景颜色设置为黑色一样简单。例如,如果您在 IB 中打开 MainWindow.xib,您应该能够在那里设置背景 - 或者在您的 AppDelegate 中您应该能够设置 UIWindow 的背景。

于 2010-11-11T18:54:20.580 回答