question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ios][issue] tintColor on image component does not work on ios

See original GitHub issue

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

OS: macOS Sierra 10.12.6 Node: 7.4.0 Yarn: Not Found npm: 5.5.1 Watchman: Not Found Xcode: N/A Android Studio: Not Found

Packages: (wanted => installed) react: ^16.0.0 => 16.0.0 react-native: ^0.51.0 => 0.51.0

Steps to Reproduce

1.Create a page with an image component in it. 2.Add a tintColor prop to the image component with any color valid color value in it 3.View the image on your screen

Expected Behavior

I though the rendered image would change to the tintColor set on the image component.

Actual Behavior

The image renders but the color has not been changed. On android the color is changed as expected just not on ios.

tint-color-bug

Reproducible Demo

https://snack.expo.io/r1o2j0wZM

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

20reactions
Sommerfeldcommented, Dec 8, 2017

In the docs tintColor is listed under style. This works on both platforms. Actually you might should call it a bug that your code is working on android.

Just change your code to

<Image
  style={{width: 50, height: 50, tintColor: 'red'}}
  source={{uri: 'https://facebook.github.io/react-native/docs/assets/favicon.png'}}
/>

Edit:

Actually on Android style attributes are passed as props to the native image component. Which might lead to similar issues but I do not know if this is necessary for some reason.

https://github.com/facebook/react-native/blob/e76abfa036ff7ba2b9b309737cbc3d5a0ae9394b/Libraries/Image/Image.android.js#L293-L299

5reactions
rikurcommented, Jul 20, 2018

Still an issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native: "tintColor" not working for Image on iOS 15
This is working fine on Android and on iOS <15. However, the tintColor is not applied to any of my icons on iOS...
Read more >
iOS13 UIButton tint misbehaving | Apple Developer Forums
In my app, I have several System UIButtons with an image (Template Image) and tint colour. I am dynamically setting the buttons tint...
Read more >
Tutorial: Image processing on iOS - Visual Servoing Platform
In this tutorial you will learn how to do simple image processing on iOS devices with ViSP. This application loads a color image...
Read more >
425935 - Wrong color profile with 2D canvas - chromium
The same sRGB color used in canvas and in CSS will look identical today. However, there still is a problem. This means that...
Read more >
[Solved]-one touch fill color in image without border
you need to know the border RGB value. So you have to check whether the touch location color is from the border's RGB...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found