创建程序窗口 

导入主视图模块并实例化主视图对象

添加主视图到程序窗口 

 

 

 

//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;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2021-06-19
  • 2021-10-03
  • 2021-07-27
  • 2021-06-12
  • 2022-12-23
猜你喜欢
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案