iOS 关闭 App 方法
2018-04-17 本文已影响27人
冰霜海胆
let suspendSelector = NSSelectorFromString("suspend")
if UIApplication.shared.responds(to: suspendSelector) {
UIApplication.shared.perform(suspendSelector)
} else {
exit(EXIT_SUCCESS)
}
let suspendSelector = NSSelectorFromString("suspend")
if UIApplication.shared.responds(to: suspendSelector) {
UIApplication.shared.perform(suspendSelector)
} else {
exit(EXIT_SUCCESS)
}