【发布时间】: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