Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support URL IMAGE? #10

Open
myselfdeveloping opened this issue Nov 7, 2015 · 1 comment
Open

Support URL IMAGE? #10

myselfdeveloping opened this issue Nov 7, 2015 · 1 comment

Comments

@myselfdeveloping
Copy link

Hi, the module supports the URL image?

@AppWerft
Copy link

Yes, in this case try:


function getImageon(url, cb) {
    var $ = Ti.Network.createHTTPClient({
        onload : function() {
            cb(this.responseData);
        }
    });
    $.open('GET', url);
    $.send();
}

module.exports = function(species) {
    var $ = Ti.UI.createWindow({
        backgroundColor : 'transparent',
        title : '',
        theme : 'Theme.NoActionBar',
        fullscreen : true,
    });
    var TiTouchImageView = require('org.iotashan.titouchimageview');
    $.zoomView = TiTouchImageView.createView();
    getImage(species.bigimage, function(blob) {
        $.zoomView.image = blob;
    });
    $.add(zoomView);
    return $;
};


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants