[TIMOB-15025] iOS7: hintText becomes invisible on dark background
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-10-04T17:07:29.000+0000 |
Affected Version/s | Release 3.1.3 |
Fix Version/s | 2013 Sprint 18, 2013 Sprint 20, 2013 Sprint 20 API |
Components | iOS |
Labels | ipass1, triage |
Reporter | Davide Cassenti |
Assignee | Ingo Muschenetz |
Created | 2013-09-02T17:15:18.000+0000 |
Updated | 2017-03-28T20:25:12.000+0000 |
Description
Problem description
When a dark background is used, the hint text does not show up in a text field.Code to reproduce
var win = Ti.UI.createWindow({
backgroundColor : "black"
});
var text = Ti.UI.createTextField({
width : 280,
height : 60,
top : 50,
left : 20,
color : "blue",
font : {
fontSize : 30,
},
backgroundColor : 'transparent',
hintText : "HINT TEXT"
});
win.add(text);
win.open();
Notes
Change the window background color to 'white' and the hintText will be visible in gray color. Same error happens changing the backgroundColor of the text field.Attachments
File | Date | Size |
---|---|---|
iOS Simulator Screen shot 3 Sep 2013 17.58.04.png | 2013-09-03T16:59:24.000+0000 | 11044 |
Tested with today's 3.1.3 and latest Xcode. The sample shows a total black window. See screenshot (yes, it is total black). The hint text is invisible, but you can click on the text field and write inside.
Resolving this as not our bug. Apple has changed the color of the hint text label on IOS7 so it is now closer to black (hence almost invisible) On older versions of IOS the hintTextColor is UIDeviceWhiteColorSpace 0.7 1 (gray with 70% opacity). On IOS7 it is UIDeviceRGBColorSpace 0 0 0.0980392 0.22 (Read RGBA. Alpha 0.22). Can't fix this since we have no API's to change this labels properties.
We do not call internal API's in our SDK. Two reasons 1. The app might be rejected 2. The solution may stop working at any time.
What about something like this? ~~~ [[UILabel appearanceWhenContainedIn:[UITextField class], nil] setTextColor:[UIColor yellowColor]]; ~~~ and of course to be able to pass a *hintColor* param for the setTextColor ?
Marking this as invalid. TIMOB-14235 will provide the ability to set an attributed string for hintText.
Closing