gpt4 book ai didi

ios - 推送 View 时更改 iOS 应用程序的背景颜色

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:50:49 26 4
gpt4 key购买 nike

在我的应用中,我使用导航 Controller 在不同 View 之间切换。我的每个 View 都有一个背景图像,但是当我从一个 View 转到另一个 View 时,在过渡时它们之间会出现一点白色。有办法改变吗?

在 TableView 类中,我在 viewDidLoad 中有这个:

UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"parchment.png"]];
self.tableView.backgroundColor = [UIColor clearColor];
self.tableView.backgroundView = imageView;
[imageView release];

在详细 View 中,我只有一个标准的 HTML 加载请求。 HTML 本身具有将羊皮纸作为背景图像的代码。这是它们的样子:

enter image description here

enter image description here

但是,从带有经文的详细 View 返回到表格 View ,我得到了这个: enter image description here

最佳答案

在你的:

 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

AppDelegate 的方法。像这样为窗口分配背景颜色:

self.window.backgroundColor = [UIColor blackColor]; // or anycolor

关于ios - 推送 View 时更改 iOS 应用程序的背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13866334/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com