Swift4.0 重写Mian函数(@UIApplication
2018-08-10 本文已影响115人
ShineYangGod
自己定义一个swift文件,命名main.swift 加上下面这段
UIApplicationMain(
CommandLine.argc,
UnsafeMutableRawPointer(CommandLine.unsafeArgv)
.bindMemory(
to: UnsafeMutablePointer<Int8>.self,
capacity: Int(CommandLine.argc)
),
NSStringFromClass(UIApplication.self),
NSStringFromClass(AppDelegate.self)
)
NSStringFromClass 可以自定义UIApplication