Swift开发之如何实现按Home键退后台的效果
Swift开发之如何实现按Home键退后台的效果
两行代码搞定
let toBackgroundControl = UIControl()
toBackgroundControl.sendAction(#selector(NSXPCConnection.suspend), to: UIApplication.shared, for: nil)
两行代码搞定
let toBackgroundControl = UIControl()
toBackgroundControl.sendAction(#selector(NSXPCConnection.suspend), to: UIApplication.shared, for: nil)