Is it possible to use the iPhone System Button styles in a regular view, other than let's say a toolbar of some kind?
This works and the button shows up nicely:
var myButton = Titanium.UI.createButton({ title : 'Hello World', top : 7, left : 5, height : 25, width : 60, backgroundColor: '#000' }); myView.add(myButton);While in this case the button doesn't show up at all:
var myButton = Titanium.UI.createButton({ title : 'Hello World', top : 7, left : 5, height : 25, width : 60, backgroundColor: '#000', style : Titanium.UI.iPhone.SystemButtonStyle.BORDERED }); myView.add(myButton);Cheers!
2 Answers
System buttons (and formats) are only allowed in toolbars and navbars (unless someone has any tricks). You can do a custom button. This is a forced design of IOS I believe. Search for systembutton in the API reference to see this confirmed.
Hi there,
I'm not certain, but if not you could create a graphic of the appropriate button-type.
I see from the docs there are also 'backgroundDisabledImage' and 'backgroundSelectedImage' to help mimic various states - depending on the button and how it's being used.
cheers, Chris.
Your Answer
Think you can help? Login to answer this question!