Skip to content

Instantly share code, notes, and snippets.

@rakhimoni
Created December 17, 2015 09:30
Show Gist options
  • Save rakhimoni/26ea767aa657235a217a to your computer and use it in GitHub Desktop.
Save rakhimoni/26ea767aa657235a217a to your computer and use it in GitHub Desktop.
Countdown Timer in Ios
var win1 = Titanium.UI.createWindow({
backgroundColor:'black'
});
var duration = 60000 * 5; // 5 minutes
var picker = Ti.UI.createPicker({
type:Ti.UI.PICKER_TYPE_COUNT_DOWN_TIMER,
countDownDuration:duration
});
picker.selectionIndicator = true;
win1.add(picker);
picker.addEventListener('change',function(e)
{
Ti.API.info('countDownDuration = ' + picker.countDownDuration);
Ti.API.info('value = ' + picker.value);
});
win1.open({modal:false});
win1.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment