AppResponder

@MainActor
open class AppResponder : UIResponder, UIApplicationDelegate

AppDelegate基类

  • 应用主delegate

    Declaration

    Swift

    @MainActor
    public class var shared: `Self`! { get }
  • 应用主window

    Declaration

    Swift

    @MainActor
    open var window: UIWindow?

Override

  • 初始化应用环境,优先级1,willFinishLaunching子模块之前调用,子类重写

    Declaration

    Swift

    @MainActor
    open func setupEnvironment()
  • 初始化应用配置,优先级2,didFinishLaunching子模块之前调用,子类重写

    Declaration

    Swift

    @MainActor
    open func setupApplication(_ application: UIApplication, options: [UIApplication.LaunchOptionsKey : Any]? = nil)
  • 初始化根控制器,优先级3,didFinishLaunching子模块之前调用,子类重写

    Declaration

    Swift

    @MainActor
    open func setupController()
  • 初始化应用服务,优先级4,didFinishLaunching子模块之前调用,子类重写

    Declaration

    Swift

    @MainActor
    open func setupService(options: [UIApplication.LaunchOptionsKey : Any]? = nil)
  • 初始化应用业务,优先级5,didFinishLaunching子模块之后调用,子类可重写

    Declaration

    Swift

    @MainActor
    open func setupBusiness()
  • 重新加载根控制器,优先级6,按需使用,子类可重写

    Declaration

    Swift

    @MainActor
    open func reloadController()

UIApplicationDelegate

Notification

URL

  • Undocumented

    Declaration

    Swift

    @discardableResult
    @MainActor
    open func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool
  • Undocumented

    Declaration

    Swift

    @discardableResult
    @MainActor
    open func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool