Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24854] iOS: tintColor doesn't work on iOS simulator

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionNot Our Bug
Resolution Date2017-06-20T12:12:58.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterILAY SENER
AssigneeUnknown
Created2017-06-20T03:33:54.000+0000
Updated2018-08-06T17:52:09.000+0000

Description

tintColor doesn't work from Alloy (yet to test from Titanium) unless the styling parameters are in the following sequence: image="/images/ic_clear_white.png" bubbleParent="false" backgroundColor="transparent" tintColor="#01A92A" if the sequence is different, tintColor doesn't work. To replicate: 1) create alloy app 2) add following to index.xml 3) test it I have attached the png image and a screen-grab of the app

Attachments

FileDateSize
ic_check_white.png2017-06-20T03:33:40.000+0000137
Screen Shot 2017-06-20 at 13.33.19.png2017-06-20T03:33:47.000+000022690

Comments

  1. Hans Knöchel 2017-06-20

    The tintColor is only applied when you use the system button-styles (default). As soon as you pass custom style parameters, e.g. color or backgroundColor, Titanium will choose the correct button-style, which is custom. In that style, the tintColor is not honored and is set with the color property. Note that the system-buttons will "fade" the click to indicate a press-state, for custom-styled buttons, you have to configure that by yourself. *Resolving as _Not our Bug_*
  2. ILAY SENER 2017-06-21

    Hi Hans, In this case, should this be documented in the docs? Myself, like many other developers out there, are not experts on both iOS and Android. It is normal for one to assume that the tint should also work in iOS as it does in Android.
  3. Hans Knöchel 2017-06-21

    Agree, I actually discovered this behavior only a few months ago while fixing a different button-related issue. We should add a paragraph to the Ti.UI.Button.tintColor property. There actually are docs "[iOS Platform Notes](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Button-property-color)" that mention the behavior, but they may be overseen and should similarly be added to the tintColor ones as well. What do you think?
  4. ILAY SENER 2017-06-21

    Hi Hans, While I agree, I am not sure if we are talking about the same thing. What I am raising is not being able to use "tintColor" on an "imageview" in iOS. It is the "X" in the screengrab. If you remove backgroundColor or bubbleParent, tintColor will fail. Also fails if you change the order of the parameters. Are we on the same page???
  5. Eric Merriman 2018-08-06

    Closing as "not our bug". If you disagree, please reopen.

JSON Source