Skip to content

Instantly share code, notes, and snippets.

@AppWerft
Created October 10, 2014 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AppWerft/b2e70fd2d18a2d9f1ae1 to your computer and use it in GitHub Desktop.
Save AppWerft/b2e70fd2d18a2d9f1ae1 to your computer and use it in GitHub Desktop.
var Modul = function() {
var options = arguments[0];
var self = Ti.UI.createView({
left : options.left,
top : options.top,
backgroundColor : 'silver',
width : options.width,
height : options.height
});
self.add(Ti.UI.createImageView({
width : options.width,
height : options.height,
image : options.image
}));
self.add(Ti.UI.createView({
bottom : 0,
backgroundColor : 'black',
opacity : 0.6,
height : 60,
}));
self.add(Ti.UI.createLabel({
width : options.width,
height : options.height,
color : 'white',
left : 5,
bottom : 5,
right : 5,
height : 30,
font : {
fontSize : 10.5
},
text : options.subtitle
}));
self.addEventListener('click', function(_e) {
console.log('imageclick');
require('ui/catalog.window')().open({
transition : Ti.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT
});
});
return self;
};
module.exports = Modul;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment