[TIMOB-20047] Parity: iOS support for hintTextColor
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-07-27T16:48:47.000+0000 |
Affected Version/s | Release 5.1.0 |
Fix Version/s | Release 5.4.0 |
Components | iOS |
Labels | qe-5.4.0, regression |
Reporter | Fokke Zandbergen |
Assignee | Hans Knöchel |
Created | 2015-11-23T15:03:49.000+0000 |
Updated | 2016-08-01T11:27:12.000+0000 |
Description
I know TIMOB-5186 was resolved by adding
attributedHintText
but I still think it would be good to have parity with hintTextColor
on Android so this common use case is simpler to implement.
Not agreeing completely, here. Android used a color value for the
hintTextColor
property. iOS expects anTi.UI.AttributedString
for theattributedHintText
property. So either we deprecatehintTextColor
on Android and introduce theattributedHintText
property, or we leave it like it is. What do you think [~fokkezb]?From a developer experience perspective I still prefer to have hintTextColor for iOS as we have with Android. The attributedHintText is a lot more work, in particular if you need to change the text. http://stackoverflow.com/a/21074761/4626813
PR: https://github.com/appcelerator/titanium_mobile/pull/7999
Verified as fixed, iOS now supports hintTextColor. Tested On: iPhone 6S (9.3.2) Device Mac OSX El Capitan 10.11.5 Ti SDK: 5.4.0.v20160608165242 Appc Studio: 4.6.0.201605201934 Appc NPM: 4.2.7-2 App CLI: 5.4.0-15 Xcode 7.3 Node v4.2.6 *Closing ticket.*
My app is crashing with
when I set my TSS to:
removing the hintTextColor and the crash is gone. tested with SDK: 5.4.0.v20160720201924 It's working fine in 5.3.1.GA (hintTextColor for iOS not available)
Valid issue! The API breaks, if you do not specify a hintText, but a hintTextColor, since the latter depends on the former one. PR (master): https://github.com/appcelerator/titanium_mobile/pull/8156 PR (5_4_X): https://github.com/appcelerator/titanium_mobile/pull/8157 Also fixing a case where the hintText is changed afterwards and haven't been applied to the hintTextColor.
Verified as fixed, I was able to reproduce the error by removing the hintText property with an earlier 5.4.X build. With the latest build the app no longer crashes. Also verified the case in which hintText is changed and hintTextColor is not applied. Tested On: iPhone 6S (9.3.2) Device & iPhone 6 Plus (8.3) Device Mac OSX El Capitan 10.11.5 Ti SDK: 5.4.0.v20160727094731 Appc Studio: 4.7.0.201607111053 Appc NPM: 4.2.7 App CLI: 5.4.0-34 Xcode 7.3 Node v4.4.7 *Closing ticket.*
There seems to be another issue in relation with alloy, hintTextColor and an int hintText! while this is working fine now:
There is a problem with an alloy hintText, that contains only an int value:
It works when you either remove the hintTextColor, remove the hintText or add a character into the hintText. Setting the hintText to "123" in the non-alloy example works fine, too!
[~michael] Thanks! That case is fixed in: master: https://github.com/appcelerator/titanium_mobile/pull/8183 5_4_X: https://github.com/appcelerator/titanium_mobile/pull/8184
fix is working fine now with a number only hintText! Thanks for the quick PR