关于 @UIApplicationMain 注解的作用

在 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.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 位于html的 中,常有如下用法: 一、页面关键字 二、页面描述 三、设定作者信息 四、限制搜索方式 有关http...
    柳叁叁阅读 280评论 0 1
  • 00:30分,窗外弥漫着雨后的味道,月亮躲在云后窥视大地。每当睡不着,我都喜欢趴在阳台上看天空。隔壁的阳台门此时也...
    陈飞扬阅读 281评论 0 2
  • “妈妈,给我买这个漂亮的公主裙吧。” “妈妈,我要吃冰淇凌。” “女儿,今天我们去逛街吧。” “爸爸,我好久都没有...
    阿俊xi阅读 161评论 0 1
  • 早安你
    sonGTaye阅读 119评论 0 0