@objc func applicationWillResignActive() {
if(self.isViewLoaded && (self.view.window != nil)){
print("进入后台")
}
}
@objc func applicationDidBecomeActive() {
if(self.isViewLoaded && (self.view.window != nil)){
print("进入前台")
}
}
@objc func applicationWillResignActive() {
if(self.isViewLoaded && (self.view.window != nil)){
print("进入后台")
}
}
@objc func applicationDidBecomeActive() {
if(self.isViewLoaded && (self.view.window != nil)){
print("进入前台")
}
}
本文标题:swift app切换至后台的检测
本文链接:https://www.haomeiwen.com/subject/gzbxqktx.html
网友评论