新闻资讯APP开发流程(四)-- ApplicationWindow.js
创建程序窗口
导入主视图模块并实例化主视图对象
添加主视图到程序窗口
//Application Window Component Constructor function ApplicationWindow() { //load component dependencies var MainView = require('ui/view/MainView'); //create component instance var self = Ti.UI.createWindow({ backgroundColor:'#ffffff' }); //construct UI var mainView = new MainView(); self.add(mainView); return self; } //make constructor function the public component interface module.exports = ApplicationWindow;