简体   繁体   English

切换标签栏控制器中的标签

[英]Switching tabs in tabbar controller

I am working on app, in which I have 2 switch between tabs in tabbar controller. 我正在开发应用程序,其中我在Tabbar控制器中的两个选项卡之间进行了切换。 Is it possible in iphone. 有可能在iPhone上。 Please help me. 请帮我。

Thanks 谢谢

What you're looking for is called "selectedIndex". 您要查找的内容称为“ selectedIndex”。

If you wanted to switch to your second TabBar, you'd call 如果您想切换到第二个TabBar,请致电

self.tabBarController.selectedIndex = 1;

Your tabbars start from index 0. 您的标签栏从索引0开始。

Use selectedIndex property . 使用selectedIndex属性。 it can help you. 它可以帮助您。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM