[TIMOB-25201] iOS: tintColor doesn't work on imageView if dimensions (height, width) are provided
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-02-21T20:12:13.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 7.1.0 |
Components | iOS |
Labels | imageView |
Reporter | ILAY SENER |
Assignee | Vijay Singh |
Created | 2017-08-28T08:09:17.000+0000 |
Updated | 2018-06-12T06:40:01.000+0000 |
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
File | Date | Size |
---|---|---|
ic_tv_white_48_2x.png | 2017-08-28T08:07:53.000+0000 | 326 |
ic_tv_white_48_3x.png | 2017-08-28T08:07:53.000+0000 | 515 |
ic_tv_white_48.png | 2017-08-28T08:07:53.000+0000 | 192 |
PR : https://github.com/appcelerator/titanium_mobile/pull/9762 Note - Test case is mentioned in ticket.
Master is merged waiting for 7.1.0 Back-port [~vijaysingh]
PR (7_1_X) : https://github.com/appcelerator/titanium_mobile/pull/9863
Verified changes are included in SDK builds: 7.1.0.v20180227113527 & 7.2.0.v20180228075644