Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9887] iOS: Support hintText in Text Area (as Documented)

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionDuplicate
Resolution Date2016-08-14T17:20:59.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sn/a
ComponentsiOS
Labelsapi, parity
ReporterDawson Toth
AssigneeChee Kiat Ng
Created2012-07-05T13:55:53.000+0000
Updated2016-08-14T17:20:59.000+0000

Description

Feature

On iOS, there is a documented hintText property for Text Areas. But there is no actual property to back it up.

Reproduction

var win = Ti.UI.createWindow({ backgroundColor: 'white' });
win.add(Ti.UI.createTextArea({
    hintText: 'I Am HINT TEXT! *clang-clang-clang*',
    top: 2, right: 2, bottom: 2, left: 2, 
    textAlign: 'left',
    width: 230, height: Ti.UI.SIZE,
    color: '#000', backgroundColor: 'transparent',
    font: { fontFamily: 'HelveticaNeue-Light', fontSize: 16 },
    borderWidth: 3, borderColor: 'transparent'
});
win.open();

Pull Request

Never mind.

Comments

  1. Edgard Zavarezzi 2012-07-27

    Same thing here...
  2. Varun Joshi 2012-08-23

    I think the documentation got updated. As mentioned here: http://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.UI.TextArea-property-hintText hintText is only for Android.
  3. Dawson Toth 2012-08-23

    Does that mean we can't add support for hint text to iOS text areas? It's impossibly difficult, and all hope is lost?
  4. Arthur Evans 2012-08-23

    That just means that the doc was corrected to represent the actual support. I believe that this is non-trivial, because Apple supports hint text on TextFields, but not on TextViews. However, that doesn't mean it can't be done. One solution suggested for native development is to add a label as a child of the textview: http://stackoverflow.com/questions/1328638/placeholder-in-uitextview A significant number of votes on stack overflow suggests that this is an feature that native iOS developers would like.
  5. Hans Knöchel 2016-08-14

    Closing as duplicate of TIMOB-13905.

JSON Source