Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Javascript iOS module

$
0
0

Hi,

I tried this mini module:

var Module = function() {
    return this;
};
Module.prototype = {
    createView : function(options) {
        this._options = options;
        this._view = Ti.UI.createView({
            width : options.width,
            height : options.height
        });
        return this._view;
    }
};
 
module.exports = Module;
This module is successful build.

Now I call it (after embedding in tiapp.xml):

var Animator = new (require('de.appwerft.view360'))();
    var view360 = Animator.createView({
        images : images,
        width: WIDTH,
        height : 0.8 * WIDTH
});
On runtime: [Object de.appwerft.view360] is not a constructor

Any ideas?


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>