应用程序委托之间的区别
有什么区别:
[[UIApplication sharedApplication] delegate]
和
UIApplicationDelegate
What is the difference between:
[[UIApplication sharedApplication] delegate]
and
UIApplicationDelegate
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
UIApplicationDelegate
是一个协议定义,这意味着它是符合该协议的对象应该实现的一组方法。[[UIApplication sharedApplication] delegate]
是您必须请求当前正在运行的应用程序的应用程序委托的方式。该委托应符合UIApplicationDelegate
。UIApplicationDelegate
is a protocol definition, which means it's a set of methods an object that conforms to it should implement.[[UIApplication sharedApplication] delegate]
is the way you have to ask for application delegate of your currently running application. That delegate should conform toUIApplicationDelegate
.