Hi, I have used slider bar in a project but it always points towards in horizontal direction i.e from(right to left) how can i change its default point position from horizontal to vertical i.e from(bottom to top)
i have used followling code to add slider bar
var sliderbar =Ti.UI.createSlider({backgroundColor:'#000000',width:20,height:100,top:10,bottom:10});
plz help
2 Answers
I did this by using a transform. You may have to play with your top / bottom / left / right settings to get it how you want it though.
var vertRotate = Titanium.UI.create2DMatrix(); vertRotate = vertRotate.rotate(90);
var verSlider = Ti.UI.createSlider ({ backgroundColor: '#000000', width: 20, height: 100, top: 10, bottom: 10, transform: vertRotate })
If you add anchorPoint: {x:1,y:1} to your slider then the rotation performs more predictable; in this case around the lower-right edge.
Your Answer
Think you can help? Login to answer this question!