美文网首页
关于 @UIApplicationMain 注解的作用

关于 @UIApplicationMain 注解的作用

作者: 貘鸣 | 来源:发表于2017-10-06 19:26 被阅读11次

在 Swift 官方文档中介绍:

Apply this attribute to a class to indicate that it’s the application delegate. Using this attribute is equivalent to calling the UIApplicationMain
function and passing this class’s name as the name of the delegate class.
If you don’t use this attribute, supply a main.swift
file with code at the top level that calls the UIApplicationMain(::::)
function. For example, if your app uses a custom subclass of UIApplication
as its principal class, call the UIApplicationMain(::::)
function instead of using this attribute.

相关文章

网友评论

      本文标题:关于 @UIApplicationMain 注解的作用

      本文链接:https://www.haomeiwen.com/subject/qhpryxtx.html