ios - UIAlertController's Action event response a bit slow?
ringa_lee
ringa_lee 2017-05-17 10:04:26
0
1
826

Directly paste Button’s click event:

func cancelButton() { let alertCtrl = UIAlertController.init(title: "是否放弃修改支付密码?", message: nil, preferredStyle: UIAlertControllerStyle.alert) alertCtrl.addAction(UIAlertAction.init(title: "否", style: UIAlertActionStyle.cancel, handler: nil)) alertCtrl.addAction(UIAlertAction.init(title: "是", style: UIAlertActionStyle.default, handler: { (action: UIAlertAction) in self.navigationController?.popViewController(animated: true) })) self.present(alertCtrl, animated: true, completion: nil) }
The

popofnavigationControllerfeels very slow. After clickingto, I feel there is a 2-second delay before returning to the upper interface. WeChat gives up changing the payment password. , the interface returned immediately after clicking. Does anyone know any solution?

ringa_lee
ringa_lee

ringa_lee

reply all (1)
仅有的幸福

I wrote a demo using your code and found that there is no 2 second delay.

It means that the problem with your code is not this part.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!