Want to use the iOS UIStepper in your Titanium App?
![]() |
Use the native iOS UIStepper in your Titanium application. This module provides Titanium accessibility to Apple’s native UIStepper introduced in iOS5.
See the below on how to get started using this in your Titanium apps today. |
Want To Download The Module?
You can download the compile module here. Please take a look at the “Before You Start” section to make sure you have all of the module dependencies.
Interested In The Source?
The source is available in the benCoding.Stepper repo on GitHub.
Before You Start
- You need Titanium 1.8.1 or greater
- This module will only work with iOS 5 or great.
How Does It Work?
This module provides Titanium access to the native Apple UIStepper controller. The module’s API has been fashioned after the Titanium slider to make it familiar to use.
What Does It Look Like?
See is a quick video showing the module in action.
Documentation & Examples
For the example app shown above and full html documentation please check out the documentation and example folders in the module zip.
How Do I Use It?
//First we bring in the module using the require syntax var stepper = require('bencoding.stepper'); //We now create our stepper control //The stepper is added to any view, window, etc just like any other Titanium control var myStepper = stepper.createStepper({ min:10, //Minimum stepper value max:200,//Maximum stepper value value:25, //Initial or starting value of the stepper continuous:true //increment on value ( or stepvalue ) for each touch event }); //We listen for the change event. myStepper.addEventListener('change',function(e){ Ti.API.info('e.value: ' + e.value + ' myStepper.value=' + myStepper.value); });