gpt4 book ai didi

iphone - 应用程序有时会显示白屏 - iOS4

转载 作者:行者123 更新时间:2023-12-03 21:20:58 26 4
gpt4 key购买 nike

我的应用程序在iOS4上运行良好,除了有时会显示白屏,特别是在很长一段时间不使用该应用程序之后(我猜它可能会从后台删除,但我已经尝试过),但是,如果我关闭应用程序并再次重新打开它,一切都会正常。不知道这个有没有什么具体的问题。这是一个带有选项卡的普通 iPhone 应用程序。

这是应用程序:didFinishLaunchingWithOptions:

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


gpsUpdate=0;
NSLog(@"entro a didFinishLaunch");
if (locationManager == nil ) {
}

if ([launchOptions objectForKey: UIApplicationLaunchOptionsLocationKey] != nil) {

// register for local notification
}
else {
iconBadNumber=0;
[self checkConnection];
[self copyDatabaseIfNeeded];
iconBadNumber=0;
self.alertsArray = [[NSMutableArray alloc] init];
self.searchArray = [[NSMutableArray alloc] init];

[Alertas getAllAlerts];

[window addSubview:tabBarController.view];
}

[tabBarController setDelegate:self];
return YES;
}

最佳答案

您仅在一种情况下将 subview 添加为窗口的 tabBarController.view 。始终在 didFinishLaunchingWithOptions 方法中,您需要添加一些 View 作为窗口的 subview ,否则它将显示白屏,因为它是窗口的默认颜色。

关于iphone - 应用程序有时会显示白屏 - iOS4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4850291/

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