Created
February 20, 2017 10:50
-
-
Save zashishz/2dad951cf4a17b65ac72fbd76e4e16c3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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