【问题标题】:Sencha Touch 2: How to reset navigation view seamlesslySencha Touch 2:如何无缝重置导航视图
【发布时间】:2014-03-13 15:58:26
【问题描述】:

如何完全重置导航视图堆栈,然后推送视图?

我的应用中有两个主要的用户流程:注册和目录。 在注册期间,我想在具有典型导航视图动画过渡的视图之间制作动画,但隐藏导航栏。目录相同,显示栏。

当注册转换到目录时,我希望从堆栈中删除注册视图,以便导航栏显示时没有后退按钮。

到目前为止,我已经尝试过使用 navigationView.pop();navigationView.reset(); 如此处所述:Sencha Touch Ext.navigation.View pop to root,然后是 ``navigationView.push(newView);

但这会导致视图被弹出,但不知何故仍留在堆栈上。使用Ext.Function.defer 来延迟我的推送调用也不起作用。

我现在尝试了多种视图层次结构组合来实现从注册到目录的转换,但似乎没有任何效果。当我在重置后拨打controller.getItems() 时,这些项目仍然存在。什么给了?

这是我当前的视图层次结构:

Ext.define('MobileWebApp.view.Launch', {
extend: 'Ext.Container',
xtype: 'launch',
id: 'launch',
config: {
    layout: 'vbox',
    baseCls: 'launch',
    items: [{
        xtype: 'container',
        id: 'header',
        layout: 'hbox',
        height: '40px',
        items: [{
            xtype: 'button',
            ui: 'plain',
            baseCls: 'logo',
            width: '110px',
            height: '25px'
        }]
    },
    {
        id: 'mainNav',
        xtype: 'navigationview',
        navigationBar: {
            ui: 'neutral',
            hidden: true
        },
        flex: 1
    }
    ]
}
});

【问题讨论】:

    标签: extjs navigation sencha-touch-2


    【解决方案1】:

    我最终创建了第三个主导航视图,它从注册导航过渡到目录导航。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多