Handler of addUIInterruptionMonitor is not called for Alert related to Photos

后端 未结 3 1458
醉梦人生
醉梦人生 2021-02-05 11:39
private func acceptPermissionAlert() {

    _ = addUIInterruptionMonitor(withDescription: \"\") { alert -> Bool in

        if alert.buttons[\"Don’t Allow\"].exists {         


        
3条回答
  •  走了就别回头了
    2021-02-05 12:16

    Add:

    app.activate()
    

    at the end of the method.

    It will bring the app to foreground again (it will be in background because of the system alert)

提交回复
热议问题