Created
February 28, 2012 22:28
-
-
Save iskugor/1935710 to your computer and use it in GitHub Desktop.
Titanium "horizontal" layout bug on iOS
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
//tested with 1.8.1 | |
//it seems that problem exists when button's dimension values are defined using percentages | |
var win = Ti.UI.createWindow({ | |
backgroundColor: '#333' | |
}); | |
var view = Ti.UI.createView({ | |
backgroundColor: '#93f', | |
height: '20%', | |
layout: 'horizontal' | |
}); | |
var button1 = Ti.UI.createButton({ | |
title: 'Button 1', | |
height: '80%', | |
width: '30%' | |
}); | |
var button2 = Ti.UI.createButton({ | |
title: 'Button 2', | |
height: '80%', | |
width: '30%' | |
}); | |
view.add(button1); | |
view.add(button2); | |
win.add(view); | |
win.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment