该怎么做“完成意外状态下的导航过渡。导航栏子视图树可能已损坏。 [英] What to do about "Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted."

查看:203
本文介绍了该怎么做“完成意外状态下的导航过渡。导航栏子视图树可能已损坏。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Appcelerator Titanium Mobile编写iPhone应用程序。我隐藏并根据焦点窗口显示选项卡组。

I'm writing an iPhone app using Appcelerator Titanium Mobile. I am hiding and showing the tab group based on what window has focus.

dashWin.addEventListener("focus",function(e) {
    if (dashWin.tabGroupVisible == true) {
        dashWin.tabGroupVisible=false;
        tabGroup.animate({bottom:-50,duration:500});
    }
});

当dashWin收到焦点事件时,上面的代码会隐藏选项卡组。但是,当在iPhone模拟器中运行时事件触发时,我在Titanium控制台中看到此消息:

The code above hides the tab group when dashWin receives a focus event. However, I see this message in the Titanium console when the event fires while running in the iPhone simulator:


完成导航过渡意外状态。导航栏子视图树可能已损坏。

Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.

Google搜索会出现一个结果:另一个StackOverflow问题,可能会暗示发生了什么。

A Google search turns up one result: Another StackOverflow question that may have a hint as to what's going on.

推荐答案

通常,标签组充当应用导航的根。当用户点击选项卡时,该选项卡的窗口会被聚焦。

Usually a tab group acts as the root of your app's navigation. When a user taps a tab, that tab's window is focused.

接下来,当用户触发需要出现新窗口的操作时,它通常以模态或开启方式显示当前窗口的顶部(在导航堆栈意义上)。在后一种情况下,告诉当前选项卡打开新窗口。

Next, when a user triggers an action that requires a new window appear, it usually appears either modally or on top (in the navigation stack sense) of the current window. In the latter case, tell the current tab to open the new window.

如果将tabBarHidden属性设置为false(创建新窗口时),则选项卡栏当前标签打开新窗口时,将为您隐藏。

If you set the tabBarHidden property to false (when you create the new window), the tab bar will be hidden for you when the new window is opened by the current tab.

这种更标准的方法对您有用吗?

Will this more standard approach work for you?

这篇关于该怎么做“完成意外状态下的导航过渡。导航栏子视图树可能已损坏。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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