gpt4 book ai didi

ios - 在 [self.window makeKeyAndVisible] 崩溃;

转载 作者:可可西里 更新时间:2023-11-01 03:03:30 27 4
gpt4 key购买 nike

我的应用程序运行良好,直到今天它开始崩溃: [self.window makeKeyAndVisible];在应用程序委托(delegate)中。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
self.viewController = [[ViewControllerWordHelper alloc] initWithNibName:@"ViewControllerWordHelper_iPhone1" bundle:nil];
} else {
self.viewController = [[ViewControllerWordHelper alloc] initWithNibName:@"ViewControllerWordHelper_iPhone" bundle:nil];
}
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}

如果我调试并进入 [self.window makeKeyAndVisible],崩溃前的下一条语句是“@synthesize window = _window;”在同一个应用委托(delegate)中。

以前的所有版本都可以正常工作。

我重启了电脑,还是一样。我正在使用 XCode 4.2。我可能不小心更改了 xcode 设置中的任何内容吗?

感谢您的帮助。

下面是整个调试窗口:

`GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 15 16:03:10 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all
Attaching to process 440.
Pending breakpoint 3 - ""ViewControllerWordHelper.m":136" resolved
Pending breakpoint 4 - ""AppDelegate.m":41" resolved
Pending breakpoint 5 - ""ViewControllerWordHelper.m":27" resolved
Pending breakpoint 6 - ""ViewControllerWordHelper.m":166" resolved
Current language: auto; currently objective-c
(gdb) `

最佳答案

造成这种情况的另一个重要原因是,如果您将一个对象连接到 .xib 中的某个对象,然后删除该对象,因为您决定不需要它但忘记破坏连接。

关于ios - 在 [self.window makeKeyAndVisible] 崩溃;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9506360/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com