预期应用程序在应用程序启动结束时将具有一个根视图控制器。wait_fences:无法收到答复:10004003 [英] Applications are expected to have a root view controller at the end of application launch wait_fences: failed to receive reply: 10004003
本文介绍了预期应用程序在应用程序启动结束时将具有一个根视图控制器。wait_fences:无法收到答复:10004003的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在iPhone模拟器中启动我的应用程序时,它没有任何问题。如果我在设备上启动,它将在打开时仍然崩溃。但是,当我启动模拟器时,它会出现以下问题:
when i launch my application in iphone emulator, it goes without any problem. If i launch on device it will crash as still as i open it. But when i launch emulator it says that problem:
Applications are expected to have a root view controller at the end of application launch
wait_fences: failed to receive reply: 10004003
我该怎么办?
这是我的应用程序委托:
What can i do? This is my application delegate:
.h:
#import <UIKit/UIKit.h>
@class TrovaChiaviViewController;
@interface TrovaChiaviAppDelegate : NSObject <UIApplicationDelegate>
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet TrovaChiaviViewController *viewController;
@end
这是.m
#import "TrovaChiaviAppDelegate.h"
#import "TrovaChiaviViewController.h"
@implementation TrovaChiaviAppDelegate
@synthesize window = _window;
@synthesize viewController = _viewController;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application
{
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
[application release];
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
}
- (void)applicationWillTerminate:(UIApplication *)application
{
}
- (void)dealloc
{
[_window release];
[_viewController release];
[super dealloc];
}
@end
推荐答案
我看不到您在哪里设置 viewController
属性,添加
I don't see where you are setting your viewController
property, add
self.viewController = [[[TrovaChiaviViewController alloc] initWithNibName:@"TrovaChiaviViewController" bundle:nil] autorelease];
在
self.window.rootViewController = self.viewController;
这篇关于预期应用程序在应用程序启动结束时将具有一个根视图控制器。wait_fences:无法收到答复:10004003的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文