Skip to content

Instantly share code, notes, and snippets.

@zashishz
Created February 20, 2017 10:50
Show Gist options
  • Save zashishz/2dad951cf4a17b65ac72fbd76e4e16c3 to your computer and use it in GitHub Desktop.
Save zashishz/2dad951cf4a17b65ac72fbd76e4e16c3 to your computer and use it in GitHub Desktop.
var win = Ti.UI.createWindow({
background:'My Window',
});
var view = Ti.UI.createView({
backgroundColor: 'transparent',
top: 0,
left: 0,
width: '100%',
height: '100%',
layout: 'vertical'
});
function makeView(color,rt) {
return Ti.UI.createView({
right: rt,
width: '33.33%',
height: '33.33%',
backgroundColor: color
});
}
view.add(makeView('red',0));
view.add(makeView('green','33.33%'));
view.add(makeView('blue','66.66%'));
win.add(view);
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment