0

所以一切都很顺利,我的应用程序几乎完成了,直到发生这种情况。除了尝试在 iOS 模拟器中运行它之外,没有进行任何更改。当我打算再次在我的 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

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

最好的问候,Øyvind Larsen Runestad。

编辑:解决了!

好的,我整理好了。项目中的 Main Storyboard 设置为空白。我所要做的就是将其更改为 MainStoryboard。

毕竟@H2CO3 似乎我的 AppDelegate 还可以;)

4

1 回答 1

0

如果这确实是您的实际代码,那么问题如下:您没有在应用程序启动时创建密钥窗口。

于 2013-01-18T18:37:09.730 回答