How to create checkbox in Titanium?

In iOs there is no checkbox options. For that we have to create it by your own.

In the top of view declare both variable:

var checkboxSelected=0; //Not selected.
var checkboxImage;

Create a button as follows:

if (checkboxSelected==1) {

//Add both checkboxYes.png and checkboxNo.png in the directory of the project.

var checkboxBtn=Titanium.UI.createButton({

    if (checkboxSelected==1) {
        alert(‘Please select checkbox.’);
        alert(‘You Have selected the checkbox..’);


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s