[TIMOB-23712] iOS: Ti.UI.IOS.Stepper.value does not default to correct value
| GitHub Issue | n/a | 
|---|---|
| Type | Bug | 
| Priority | None | 
| Status | Closed | 
| Resolution | Fixed | 
| Resolution Date | 2016-08-02T15:25:25.000+0000 | 
| Affected Version/s | Release 5.4.0 | 
| Fix Version/s | Release 6.0.0 | 
| Components | iOS | 
| Labels | qe-5.4.0, qe-6.0.0 | 
| Reporter | Eric Wieber | 
| Assignee | Angel Petkov | 
| Created | 2016-08-01T18:28:31.000+0000 | 
| Updated | 2016-09-15T08:57:25.000+0000 | 
Description
	The default value for Ti.UI.IOS.Stepper.value is null, when it should be 0 according to: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIStepper_Class/index.html#//apple_ref/occ/instp/UIStepper/value
*Steps to Reproduce Issue*:
1. Create a new Alloy project
2. Use the below code to demonstrate the issue
3. Run the project and click on "OK"
*Actual Results*
The value is output as null
*Expected Results*
The value is output as 0
*Notes*
This impacts trying to decrement the stepper on first click. Trying to increment the stepper sets it to the step value.
*Code*:
*index.xml*
<Alloy>
    <Window class="container">
        <Stepper id="stepper" onClick="doClick" 
             top="30" tintColor="green" steps ="3" />
        <Button onClick="btnClick">OK</Button>
    </Window>
</Alloy>
*index.js*
function doClick(e) {
    Ti.API.info($.stepper.value);
}
function btnClick(e) {
    Ti.API.info($.stepper.value);
}
$.index.open();
PR: https://github.com/appcelerator/titanium_mobile/pull/8186 Demo Code:
var win = Ti.UI.createWindow({ backgroundColor: '#fff' }); var stepper = Ti.UI.iOS.createStepper({ top: 20, tintColor:"green", steps:3, maximum:30, minimum:0 }); var button = Titanium.UI.createButton({ title: 'Get Value', top: "50%", middle: 0, width: 100, height: 50 }); button.addEventListener("click",function(e){ alert(stepper.value); // or (stepper.getValue()) }); win.add(button); win.add(stepper); win.open();Verified as fixed, Ti.UI.IOS.Stepper.value default value is 0. Tested On: iPhone 6 Plus 10.0.1 Device & Simulator iPhone 5S 9.3.5 Device Mac OSX El Capitan 10.11.6 Ti SDK: 6.0.0.v20160914165725 Appc Studio: 4.8.0.201609101003 Appc NPM: 4.2.8-6 App CLI: 6.0.0-42 Xcode 8.0 Node v4.4.7 *Closing ticket.*