📜  快速打开设置页面 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:01:01.029000             🧑  作者: Mango

代码示例1
guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else {
  return
}

if UIApplication.shared.canOpenURL(settingsUrl) {
  UIApplication.shared.open(settingsUrl, completionHandler: { (success) in
                                                             print("Settings opened: \(success)") // Prints true
                                                            })
}