Ios Swift警报自定义显示和分发
我在viewcontroller中创建了一个自定义警报,遵循该问题投票率最高的答案的指导原则: 我用它来显示警报,它被用作“加载” 显示:Ios Swift警报自定义显示和分发,ios,swift,uialertview,uialertcontroller,Ios,Swift,Uialertview,Uialertcontroller,我在viewcontroller中创建了一个自定义警报,遵循该问题投票率最高的答案的指导原则: 我用它来显示警报,它被用作“加载” 显示: self.presentViewController(self.pending, animated: true, completion: nil) 我成功地显示了它,但我需要在进程结束后通过调用它的viewcontroller终止它,而不是像我引用的示例中那样自行终止它。 我试过了,但什么也没发生 self.pending.dismissViewCont
self.presentViewController(self.pending, animated: true, completion: nil)
我成功地显示了它,但我需要在进程结束后通过调用它的viewcontroller终止它,而不是像我引用的示例中那样自行终止它。
我试过了,但什么也没发生
self.pending.dismissViewControllerAnimated(false, completion: { (vetor) -> Void in
[…]
})
如何正确执行此操作?在演示
UIViewController
上调用discover
,而不是在演示的控制器上:
self.dismiss(animated: true) {
// go on
}
在显示的
UIViewController
上调用discouse
,而不是在显示的控制器上调用:
self.dismiss(animated: true) {
// go on
}