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

iOS: tintColor doesn't work on imageView if dimensions (height, width) are provided

    Details

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

      Mac OS X, Sierra
      Appc Studio : 4.9.0.201705302345
      SDK : 6.1.2
      iOS (Emulator) : iPhone 7, iOS 10.3

    • Sprint:
      2018 Sprint 04 SDK

      Description

      if height and width are provided, tintColor doesn't work on iOS for imageView.

      Alloy

      <Alloy>
      	<Window class="container" backgroundColor="orange">
      		<View tintColor="blue" backgroundColor="green" height="100" layout="vertical">
      			<ImageView  image="/images/ic_tv_white_48.png" tintColor="red" height="40" width="40" />
      			<ImageView  image="/images/ic_tv_white_48.png" tintColor="red"  />
      		</View>
      	</Window>
      </Alloy>
      

      Classic

      Ti.UI.backgroundColor = 'orange';
      var win = Ti.UI.createWindow();
       
      var view = Ti.UI.createView({
      	backgroundColor: 'green',
      	height: 100,
      	layout: 'vertical'
      });
       
      var image = Ti.UI.createImageView({
      	image:'/ic_tv_white_48.png',
      	tintColor: 'red',
      	width: 40,
      	height: 40
      });
       
      var image2 = Ti.UI.createImageView({
      	image:'/ic_tv_white_48.png',
      	tintColor: 'red'
      });
       
      view.add(image);
      view.add(image2);
      win.add(view);
      win.open();
      
      

      However, you can change the tintColor afterwards from js.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vijaysingh Vijay Singh
                Reporter:
                isener ILAY SENER
                Reviewer:
                Hans Knöchel
                Tester:
                Samir Mohammed
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code