知道何时取消按钮被点击在Apple Watch模式接口控制器 [英] Know When Cancel Button is Clicked in Apple Watch Modal Interface Controller

查看:225
本文介绍了知道何时取消按钮被点击在Apple Watch模式接口控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法知道如果接口控制器以模态显示,用户是否按下取消按钮?

Is there a way to know if the cancel button is pressed by the user if the interface controller was displayed modally? Let's say you want to do something before the interface controller is dismissed.

推荐答案

唯一可用的方法是 -didDeactivate 。当屏幕消失或应用程序关闭时,这将被调用。很遗憾,没有直接了解何时按取消按钮的方法。

The only method available is -didDeactivate. This will get called when the screen will disappear or when the app will close. Unfortunately, there is no direct way to know when the cancel button is pressed.

这篇关于知道何时取消按钮被点击在Apple Watch模式接口控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆