applicationDidFinishLaunching未被调用 [英] applicationDidFinishLaunching not invoked

查看:916
本文介绍了applicationDidFinishLaunching未被调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的appdelegate.m中,不会调用applicationDidFinishLaunching。
我读过这是因为我的应用程序代表没有正确连接,但我不知道如何连接它。我所做的是右键单击XIB文件中的Application,然后将委托出口拖到某处...但不知道在哪里。
任何帮助表示赞赏。
谢谢!

In my appdelegate.m, the applicationDidFinishLaunching is not invoked. I have read that this is due to the fact my "Application"'s delegate is not properly connected, but I don't know how to connect it. What I do is right-clicking on Application from the XIB file, and drag the delegate outlet somewhere... but don't know where. Any help appreciated. Thanks !

推荐答案

在MainMenu.xib中,确保有一个AppDelegate类的实例。要创建一个,将一个普通对象(蓝色立方体)拖到列表中,并将其类名设置为AppDelegate(或者您的app delegate类名称)。

In your MainMenu.xib, make sure there's an instance of your AppDelegate class. To make one, drag a plain object (blue cube) into the list and set its class name to AppDelegate (or whatever your app delegate class name is).

同样在MainMenu.xib,要连接它,将Application对象的连接拖到AppDelegate实例(蓝色立方体)并将其连接到代理插座。

Also in the MainMenu.xib, to connect it, drag a connection from the Application object to your AppDelegate instance (the blue cube) and connect it to the delegate outlet.

完成。

这篇关于applicationDidFinishLaunching未被调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆