[TIMOB-18296] iOS: Click on accessory not recognised in list view when clicked on disclosure or checkmark accessory type
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2014-12-30T17:32:49.000+0000 |
Affected Version/s | Release 3.5.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | qe-3.5.0 |
Reporter | Satyam Sekhri |
Assignee | Ingo Muschenetz |
Created | 2014-12-30T04:58:58.000+0000 |
Updated | 2017-03-20T17:15:23.000+0000 |
Description
This is not a regression as the issue also occurs in 3.4.1 and 3.4.0.GA
Steps to Reproduce:
1. Create a project with code below and install the app on device
2. Launch the app. A list view with three rows is shown. Each having a different accessory type (Detail, Disclosure, Checkmark)
3. Click on the accessory in each row and check logs
Actual Result:
For row 2 and row 3 having accessory of types disclosure and checkmark, the logs show "accessoryClicked:false" even though it was clicked. For accessory type detail it shows true.
var win=Ti.UI.createWindow({
backgroundColor:'white'
});
var listView = Ti.UI.createListView();
var tasks = [{
id: 'trash',
name: 'Take Out the Trash',
icon: 'KS_nav_views.png',
accessory: Ti.UI.LIST_ACCESSORY_TYPE_DETAIL
}, {
id: 'dishes',
name: 'Do the Dishes',
icon: 'KS_nav_views.png',
accessory: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE
}, {
id: 'doggie',
name: 'Walk the Dog',
icon: 'KS_nav_views.png',
accessory: Ti.UI.LIST_ACCESSORY_TYPE_CHECKMARK
}];
var data = [];
for (var i = 0; i < tasks.length; i++) {
data.push({
properties: {
itemId: tasks[i].id,
title: tasks[i].name,
image: tasks[i].icon,
accessoryType: tasks[i].accessory,
color: 'black'
}
});
}
var section = Ti.UI.createListSection();
section.setItems(data);
listView.sections = [section];
listView.addEventListener('itemclick', function(e) {
Ti.API.info(JSON.stringify(e));
Ti.API.info('itemIndex' + JSON.stringify(e.itemIndex));
});
win.add(listView);
win.open();
This is expected behavior. See https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITableViewCell_Class/index.html#//apple_ref/occ/instp/UITableViewCell/accessoryType
Closing ticket as invalid.