iOS 关闭 App 方法

2018-04-17  本文已影响27人  冰霜海胆
let suspendSelector = NSSelectorFromString("suspend")
if UIApplication.shared.responds(to: suspendSelector) {
    UIApplication.shared.perform(suspendSelector)
} else {
    exit(EXIT_SUCCESS)
}
上一篇下一篇

猜你喜欢

热点阅读