- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我的应用程序运行良好,直到今天它开始崩溃: [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/
我已将后台任务功能添加到我的应用程序中。这是我的应用委托(delegate) // AppDelegate.m - (BOOL)application:(UIApplication *)applica
我正在尝试注销并返回到登录 View Controller 。 所以我创建一个窗口,设置 rootViewController,然后设置 KeyAndVisible。 (不在 AppDelegate
makeKeyWindow 和 makeKeyAndVisible 这两个 UIWindow 方法有什么区别? 什么时候 UIWindow 会成为 keyWindow 但不可见? 最佳答案 Each
我有一个自定义的 UIStoryboardSegue,可以在 iOS12.* 中按需要工作。 目标 View Controller 之一是 UITabbarController:对于每个选项卡,我都有
如果我删除Exception BreakPoint,一切都会好的。但是当我添加Exception breakPoint进行调试时,出现了一些错误: self.window = [[UIWindow
我有一个最初为 iOS 6 编写的应用程序,但现在我希望它能在 iOS 7 上运行。我在 Xcode 5 中打开该项目并编辑了一些内容。它工作正常,除了一条错误消息,如 Need a root vie
我想知道在所有 iOS 应用程序中,我们必须为我们的 UIWindow 对象编写 makeKeyAndVisible。那么有没有一个例子,我们不希望我们的应用程序 makeKeyAndVisible。
我正在重新创建某种特定于我的应用的 UIAlertView,因此我将 UIWindow 子类化来执行此操作。该窗口被添加到 [UIApplication sharedApplication].wind
我有一个场景,我从主窗口的 rootViewController 呈现一个模态视图 Controller 。当它加载该模式的内容时,我正在切换到另一个加载窗口,我将其设置为关键且可见。 此窗口充当加载
在每个应用程序中, 总是写成[window makeKeyAndVisible]; makeKey 是什么意思? 最佳答案 关键窗口是将接收用户交互的窗口。 你可以看看这个: http://devel
我的应用程序运行良好,直到今天它开始崩溃: [self.window makeKeyAndVisible];在应用程序委托(delegate)中。 - (BOOL)application:(UIApp
我的要求是 UITabBarController 是 rootviewcontroller,在第一次启动应用程序时,我想显示 UINavCon 内的登录过程,我通过 presentViewContro
调试时出现以下错误,发现在此行之后,应用程序崩溃: [self.window makeKeyAndVisible]; 尝试通过 Xcode 8.0 在设备上运行时,出现以下错误日志: 2016-10-
我是一名优秀的程序员,十分优秀!