[TIMOB-15667] iOS: TableViewRow (with custom layout) hasCheck don't works correctly
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2014-03-14T21:43:21.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2014 Sprint 05, 2014 Sprint 05 API |
Components | iOS |
Labels | custom, hascheck, ios7, layout, tableviewrow |
Reporter | Eduardo Silva |
Assignee | Vishal Duggal |
Created | 2013-11-04T19:22:45.000+0000 |
Updated | 2017-03-21T22:05:34.000+0000 |
Description
A TableViewRow (with custom layout) hasCheck don't works correctly in iOS7.
The hasCheck property changed (I see in log), but the symbol remains in screen.
The check symbol appears and disappear, but I need tap in the row many times. The check symbol don't match with the hasCheck value.
custom_tableviewrow.xml
<Alloy>
<TableViewRow id="row" onClick="select">
<ImageView id="image" class="brandDefault" />
<Label id="titleLabel" class="h3"/>
</TableViewRow>
</Alloy>
custom_tableviewrow.js
var args = arguments[0] || {};
$.row.hasCheck = false;
$.titleLabel.text = args.get("name");
$.image.image = args.get("imagePath");
function select(e) {
if($.row.hasCheck == false) {
$.row.setHasCheck(true);
} else {
$.row.setHasCheck(false);
}
}
custom_tableviewrow.tss
"#row": {
layout:"horizontal",
width:Ti.UI.FILL,
height:"40dp",
selectedBackgroundColor:"#ccc",
selectedColor:"#000"
}
"#image": {
width:"40dp", height:"40dp"
}
".brandDefault": {
image: "/images/brand_default.png",
defaultImage: "/images/brand_default.png"
},
"#titleLabel": {
textAlign:"left",
width:Ti.UI.SIZE,
height:Ti.UI.FILL,
backgroundColor:"transparent",
color:"#000"
}
If I try use only the title property in row (removing the layout) it's works fine. :/
In addition to the post from Eduardo. The value of the hasCheck property is correctly changed for the row. If you scroll the table enough to put the clicked row out of sight and scrollback, the mark appears. A solution to correct this is to re-render the table with *table.setData(table.data)*
Same here. Only, in my case, the check mark seems to be white. Row with no backgroundColor declared: !http://content.screencast.com/users/Stephen_Feather/folders/Jing/media/be72c944-8149-4291-8516-1703eadbe541/00000254.png! Row with a blue backgroundColor declared: !http://content.screencast.com/users/Stephen_Feather/folders/Jing/media/c8bbb364-a873-4de0-b96b-befb9593e3a0/00000253.png! tintColor and color have no effect.
Titanium SDKs: 3.3.0.v20131127225644 Xcode: 5.0.2 (build 5A3005) iOS SDKs: 7.0.3 Titanium CLI CLI Version = 3.2.0
@[~sfeather] There is no support for TintColor on TableViewRow and ListItem. I have created another ticket to track that issue TIMOB-16628
This is the Common JS Code I used to test. Going to mark the issue as can not reproduce
Please attach complete test case to reproduce issue if it exists
Closing ticket as the issue cannot be reproduced and due to the above comments.