启动图像后iPhone屏幕变黑

时间:2013-01-18 18:31:57

标签: ios error-handling xcode4.5

所以一切都很好,我的应用程序差不多完成了,直到发生这种情况。没有做任何更改,试图在iOS Simulater中运行它。当我再次在我的iPhone上试用它时,屏幕在启动图像后变黑!我在xcode中没有任何错误。

我试图清理我的项目,重置iOS模拟器(仅用于踢),重新启动我的Macbook,重新启动iPhone,从主屏幕删除应用程序并再次安装。

在我的iPhone 5上为iOS 6构建。

AppDelegate.h

//
//  AppDelegate.h
//  
//
//  Created by Øyvind Larsen Runestad on 13.01.13.
//  Copyright (c) 2013 Øyvind Larsen Runestad. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate> {

IBOutlet UITabBarController *tabBarController;
}
@property (strong, nonatomic) UIWindow *window;

@property(nonatomic, readonly) UITabBarController *moreNavigationController;

@end

AppDelegate.m

//
//  AppDelegate.m
//  
//
//  Created by Øyvind Larsen Runestad on 13.01.13.
//  Copyright (c) 2013 Øyvind Larsen Runestad. All rights reserved.
//

#import "AppDelegate.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.
    return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application
{
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application
{
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application
{
    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application
{
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@end

任何人都有解决这个问题的方法吗?

祝你好运, ØyvindLarsenRunestad。

编辑:已解决!

  
    

好的,我把它整理出来了。项目中的主要故事板设置为空白。我所要做的就是将其更改为MainStoryboard。

         

似乎我的AppDelegate毕竟是@ H2CO3没问题;)

  

1 个答案:

答案 0 :(得分:0)

如果真的是您的实际代码,则问题如下:您在应用启动时没有创建关键窗口。

相关问题