一位用户发送了一封电子邮件说,在启动ipad应用程序时,他看到了启动画面,而且statusBar变得可见,之后只有空白屏幕。所以他无法继续使用应用程序。用户拥有带iOS 5.1.1的iPad3。我已经测试了所有可能的iOS版本和不同的使用场景,但无法重现这种情况。有什么想法吗?
启动代码:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[UIApplication sharedApplication] setStatusBarHidden:NO];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque];
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
{
self.window.rootViewController = padMainNavigationController;
}
else
{
self.window.rootViewController = self.tabBarController;
}
NSError *sessionError = nil;
[[AVAudioSession sharedInstance] setDelegate:self];
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:&sessionError];
// 2. Changing the default output audio route
UInt32 doChangeDefaultRoute = 1;
AudioSessionSetProperty(kAudioSessionProperty_OverrideCategoryDefaultToSpeaker, sizeof(doChangeDefaultRoute), &doChangeDefaultRoute);
[self.window makeKeyAndVisible];
int cacheSizeMemory = 4*1024*1024; // 4MB
int cacheSizeDisk = 60*1024*1024; // 60MB
NSURLCache *sharedCache = [[[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"] autorelease];
[NSURLCache setSharedURLCache:sharedCache];
return YES;
}