switch not clickable inside view
If i put a switch inside one of my views the switch is not clickable. If i put that same switch in say the titlebar, rightnavbar, or the actual window the switch works like it should.
Is this just a function of the switch? It needs to be placed directly in a window and can't be placed in a view?
Code:
var viewHave = Ti.UI.createView({
width:320,
height:'auto',
top:50,
visible:'true'
});
var swtchHave = Ti.UI.createSwitch({
value:true,
top:240
});
//add elements to 'Have'
viewHave.add(swtchHave);
curWin.add(viewHave);
1 Answer
-
It should work out of the box with your code.
Try to remove the 'visible' property and use show()/hide(), as far as I know 'visible' is only a getter, so something maybe breaks when you set this.