[TIMOB-5009] Change the text of switch control on iphone
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2012-05-29T15:36:00.000+0000 |
Affected Version/s | Release 1.7.2 |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Francisco Antonio Duran Ramirez |
Assignee | Neeraj Gupta |
Created | 2011-08-15T10:47:27.000+0000 |
Updated | 2014-06-19T12:46:19.000+0000 |
Description
Bug
Problem
On iphone you can not change the text of the switch control.Reproducible steps:
1.Run the code below.Expected behavior
Customer wants to change the text of the switch control on iphoneSample Code:
var win1 = Titanium.UI.createWindow({
title:'My window',
backgroundColor:'#fff'
});
var basicSwitch = Titanium.UI.createSwitch({
value:false,
top:30,
titleOff:'Hi',
titleOn:'Hello'
});
win1.add(basicSwitch);
// open tab group
win1.open();
Unfortunately, this is not possible. https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UISwitch_Class/Reference/Reference.html The underlying native UISwitch class offers no means to change the text. iOS actually changes localizes the text automatically, and in cases where 'on' and 'off' would be too long, use 1 and 0. Proposing we change this to 'won't fix' or 'hold'. Updating this into a feature request since this is a request for added functionality.