Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23565] iOS: TintColor for ImageView (Parity)

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2016-06-28T05:32:38.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.4.0
ComponentsiOS
Labelsimageview, ios, parity, qe-5.4.0
ReporterHans Knöchel
AssigneeHans Knöchel
Created2016-06-27T21:06:28.000+0000
Updated2016-06-28T20:33:43.000+0000

Description

Adding tintColor property to iOS using UIImageRenderingModeAlwaysTemplate

Demo


/**
 *  TIMOB-23565
 *
 *  Sets the initial tintColor to red, changes it to green after 2 seconds
 *  and removes the tintColor after another 2 seconds.
 **/

var win = Ti.UI.createWindow();
var img = Ti.UI.createImageView({
    tintColor: "red",
    image: "images/appcelerator_small.png"
});

win.add(img);

setTimeout(function() {
    img.setTintColor("green");
    
    setTimeout(function() {
        img.setTintColor(null);
    },2000);
    
},2000);

win.open();

Comments

  1. Hans Knöchel 2016-06-27

    Adding parity for TIMOB-19912 using best-practices (UIImageRenderingModeAlwaysTemplate)
  2. Hans Knöchel 2016-06-28

    PR: https://github.com/appcelerator/titanium_mobile/pull/8090
  3. Hans Knöchel 2016-06-28

    PR (5_4_X): https://github.com/appcelerator/titanium_mobile/pull/8092
  4. Chee Kiat Ng 2016-06-28

    CR and FT passed. PRs merged.
  5. Harry Bryant 2016-06-28

    Verified as fixed, tintColor is now supported for ImageView element on iOS. Tested On: iPhone 6S (9.3.2) Device & Sim Mac OSX El Capitan 10.11.5 Ti SDK: 5.4.0.v20160627224205 Appc Studio: 4.7.0.201606220541 Appc NPM: 4.2.7-2 App CLI: 5.4.0-20 Xcode 7.3 Node v4.2.6 *Closing ticket.*

JSON Source