1

我最近一直在使用 Xcode 5 预览版为 ios 7 开发。因为我已经安装了最终版本,所以我的应用程序没有运行。当应用程序开始加载时,我得到了这个......

int main(int argc, char *argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
    }
}

这是我的错误信息-

2013-09-21 16:30:33.117 应用程序名称[6039:60b]-[AppDelegate 窗口]:无法识别的选择器发送到实例 0x15e70080 2013-09-21 16:30:33.128 应用程序名称 [6039:60b] * 终止应用程序到期to uncaught exception 'NSInvalidArgumentException', reason: '-[AppDelegate window]: unrecognized selector sent to instance 0x15e70080' * First throw call stack: (0x2d488e8b 0x377826c7 0x2d48c7b7 0x2d48af55 0x2d3d9e98 0x60c1d 0x2fc7f425 0x2fc7ee6b 0x2fc794b9 0x2fc13be7 0x2fc12edd 0x2fc78ca1 0x320f476d 0x320f4357 0x2d45377f 0x2d45371b 0x2d451ee7 0x2d3bc541 0x2d3bc323 0x2fc77f43 0x2fc731e5 0x74cd5 0x37c7bab7) libc++abi.dylib:以 NSException (lldb) 类型的未捕获异常终止

4

1 回答 1

0

错误消息-[AppDelegate window]: unrecognized selector sent to instance表明您的 appDelegate 类缺少所需的 UIWindow *window 属性。您的 appDelegate 头文件至少应如下所示:

 @interface AnyNameAppDelegate : UIResponder <UIApplicationDelegate>
 @property (strong, nonatomic) UIWindow *window;
 @end
于 2013-09-21T23:39:12.683 回答