【问题标题】:Programmatically switching to the "More" tab on iPhone以编程方式切换到 iPhone 上的“更多”选项卡
【发布时间】:2010-12-07 08:11:09
【问题描述】:

我想以编程方式将我的 tabBarController 初始化为用户选择的最后一个选项卡。这适用于我的标准选项卡,但如果 uwer 在“更多”选项卡上,我无法弄清楚如何初始化它,因为此选项卡(据我所知)没有索引)。

有人知道这样做的方法吗?

【问题讨论】:

    标签: iphone cocoa-touch uitabbarcontroller


    【解决方案1】:

    直接来自-[UITabBarController selectedIndex] 文档:

    选择更多导航 控制器本身,您必须更改 selectedViewController 的值 改为属性

    那就这样吧:

    [controller setSelectedViewController:[controller moreNavigationController]];
    

    【讨论】:

    • 谢谢!不知道为什么我没有找到:)
    • 是否可以直接切换到更多屏的编辑模式?类似[controller moreNavigationController].editing = YES;
    猜你喜欢
    • 2011-07-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-07
    • 1970-01-01
    • 2011-11-06
    • 2017-03-07
    • 1970-01-01
    相关资源
    最近更新 更多