2011-08-15 34 views
0

app.js文件是:为什么我无法使用Titanium创建基本窗口?

// this sets the background color of the master UIView (when there are no windows/tab groups on it) 
Titanium.UI.setBackgroundColor('#fff'); 

// create tab group 
//var tabGroup = Titanium.UI.createTabGroup(); 


// 
// create base UI tab and root window 
// 
var win1 = Titanium.UI.createWindow({ 
    title:'TAB 1', 
    backgroundColor:'#f00' 
}); 

win1.addEventListener('click',function() 
     { 
      // set background color back to white after tab group transition 
      alert('#fff'); 
     }); 

和加载都是红色的“技术钛”屏幕。我究竟做错了什么?

回答

2

你需要打开窗户

win1.open(); 
相关问题