如何在“更多"菜单中切换到标签栏项看法? [英] How to switch to a tabbar item in the "More" View?

查看:67
本文介绍了如何在“更多"菜单中切换到标签栏项看法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用目标C为Iphone/Ipad编写一个应用程序.我在标签栏的更多"中有一些项目.我想切换到这些视图之一.我该怎么做?通常我会使用selectedIndex,但是在更多"标签上不起作用.

I'm programming an app in objective c for Iphone/Ipad. I have some items in the "more" of the tabbar. I want to switch to one of those views. How can i do it? Normally i would use selectedIndex, but it doesn't work on the "More" tab.

推荐答案

要从更多屏幕中选择视图控制器,您应该首先选择更多视图控制器,如先前答案中所示:

To select view controller from more screen you should select more view controller first as it displayed in previous answer:

[tabBarController setSelectedViewController: [tabBarController moreNavigationController]]

然后执行pushViewController方法以获取更多视图控制器

And then perform pushViewController method for more view controller

[[tabBarController moreNavigationController] pushViewController:neededViewController animated:NO]

或者使用更好的方法:

[tabBarController setSelectedViewController: neededViewController ]

这篇关于如何在“更多"菜单中切换到标签栏项看法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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