-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ios][issue] tintColor on image component does not work on ios #17124
Comments
In the docs tintColor is listed under 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. react-native/Libraries/Image/Image.android.js Lines 293 to 299 in e76abfa
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions. |
I am having the same issue with this ie. passing tint as a prop to the image
This works fine for android but not in ios If you want it to work on ios as well go with this ie. passing tint color with style instead of passing it as a props
|
Still an issue. |
Edit: It's working now. |
In Android, If you pass tintColor with style instead. It's not working.
But it works when you pass it as prop to Image.
|
is this work in windows ?
|
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.
Reproducible Demo
https://snack.expo.io/r1o2j0wZM
The text was updated successfully, but these errors were encountered: