【发布时间】:2015-12-17 18:21:14
【问题描述】:
大家好,我对 Appcelerator 中的模态视图有疑问。目前,我在应用程序中显示了一个带有导航窗口的模态视图(见下文)。
//this is my modal
<Alloy>
<NavigationWindow id="win1" platform="ios">
<Window id="win2" title="Red Window" backgroundColor="red">
</Window>
</NavigationWindow>
</Alloy>
//this is the window i want to push in this modal view.
<Alloy>
<Window id="win3" title="Blue Window" backgroundColor="blue">
</Window>
</Alloy>
在我的 win2.js(这是我的父窗口,也是我的模态窗口)中,我有以下内容
var window = $.win2;
var navigationwindow = $.win1;
var button = Titanium.UI.createButton({
title: 'Open Blue Window'
});
button.addEventListener('click', function(){
navigationwindow.openWindow(win3, {animated:true});
});
但这并没有做任何事情。甚至可以在模态窗口中推送窗口吗?
如果这里有人可以帮助我,我将非常高兴。
【问题讨论】:
标签: ios titanium-alloy appcelerator-mobile