跳转到UITabBarController中的特定选项卡 [英] Jump to a specific tab in a UITabBarController
问题描述
我想跳转到tabcontroller中的第三个标签页。我在谷歌搜索但没有找到任何帮助。
I want to jump to third tab in tabcontroller. I searched in Google but found nothing helpful.
如果有人可以提供帮助,我将不胜感激。
If anybody can help I will be grateful.
推荐答案
是标题/问题改变了吗?我认为这个问题是关于Xcode ...
Was the title/question changed? I thought the question was about Xcode...
对于你所要求的,尝试设置你的 selectedIndex
UITabBarController,如下所示:
For what you're asking, try setting selectedIndex
of your UITabBarController, like this:
self.tabBarController.selectedIndex = indexOfTab;
但是不要过度使用它,标签之间的一些自动转换可被视为糟糕的用户体验。
However don't overuse it, some automatic transitions between tabs can be considered as bad user experience.
不要只停留在此快捷方式 - 了解更多信息!这是一个广泛的Xcode 4快捷方式列表:打印B& W版本,将它钉在墙上,学习并享受Xcode。
Don't just stop with this shortcut - learn more! Here's an extensive list of Xcode 4 shortcuts: print the B&W version, pin it your wall, learn and enjoy the Xcode even more.
这篇关于跳转到UITabBarController中的特定选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!