Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25470

tintColor hex value only works without '#' on iOS simulator

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: iOS
    • Labels:
    • Environment:

      Mac OSX Sierra
      AppC Studio : 4.10.0.201709271713
      SDK: 6.2.2 & 6.3.0.v20171024230412
      iPhone 7 & others (Simulator)

    • Story Points:
      3
    • Sprint:
      2018 Sprint 12 SDK

      Description

      tintColor works with the hex value only, without the '#'...

      var win = Ti.UI.createWindow({ backgroundColor: "olive", layout: "vertical", id: "index" });
       
      var img1 = Ti.UI.createImageView({ id: "img", image: "/images/ic_assignment_white_48.png", top: "40%", tintColor: "#ffa500" });
      var img2 = Ti.UI.createImageView({ id: "img2", image: "/images/ic_assignment_white_48.png", tintColor: "ffa500" });
       
      win.add(img1);
      win.add(img2);
       
      win.open();
      

      To replicate, create a basic alloy app. Replace code in index.xml and index.js with below, respectively:

      INDEX.XML
      ----------------
      <Alloy>
      <Window class="container" layout="vertical" backgroundColor="olive">
      <ImageView id="img" image="/images/ic_assignment_white_48.png" top="40%" tintColor="#ffa500" />
      <ImageView id="img2" image="/images/ic_assignment_white_48.png" tintColor="ffa500" />
      <ImageView id="img3" image="/images/ic_assignment_white_48.png" />
      <ImageView id="img4" image="/images/ic_assignment_white_48.png" />
      </Window>
      </Alloy>

      INDEX.JS
      ------------
      $.index.open();

      $.img3.tintColor= '#ffa500';
      $.img4.tintColor= 'ffa500';

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vijaysingh Vijay Singh
                Reporter:
                isener ILAY SENER
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-5940
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code