在NavigationBar中按下后退按钮时会发生什么 [英] What happens when back button is pressed in navigationBar

查看:62
本文介绍了在NavigationBar中按下后退按钮时会发生什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道当在navigationBar上按下后退按钮时会调用什么函数.

I wonder what is the function is called when the back button is pressed on the navigationBar.

我想在按下按钮时添加一些功能,谁知道呢?

I want to add some functionality when the button is pressed, who knows it?

预先感谢

推荐答案

所需的功能位于UINavigationBarDelegate协议中.实现-navigationBar:shouldPopItem:方法,并将您的类设置为相关导航栏的delegate.

The functionality you want is in the UINavigationBarDelegate protocol. Implement the -navigationBar:shouldPopItem: method and set your class as the delegate of the navigation bar in question.

这篇关于在NavigationBar中按下后退按钮时会发生什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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