iOS 关闭 App 方法

let suspendSelector = NSSelectorFromString("suspend")
if UIApplication.shared.responds(to: suspendSelector) {
    UIApplication.shared.perform(suspendSelector)
} else {
    exit(EXIT_SUCCESS)
}

你可能感兴趣的:(iOS 关闭 App 方法)