[英]How to know if a user has changed tab?
I have a Tab Bar Controller
which has some Navigation Controllers
as children. 我有一个Tab Bar Controller
,其中有一些Navigation Controllers
作为子级。 Is it possible to find out when a user navigated away from certain Navigation Controller
(as he switched to another tab) in form of a callback? 是否可以找出用户何时以回调形式离开某个Navigation Controller
(当他切换到另一个选项卡时)?
Whichever class is the Tab Bar Controller's delegate will get sent the following selectors: Tab Bar控制器的代表是哪个类,将向其发送以下选择器:
- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.