I have created a method - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
for UITableViewCellAccessoryDetailDisclosureButton.
Now I want to use UITableViewCellAccessoryDisclosureIndicator in place of UITableViewCellAccessoryDetailDisclosureButton.
Is there any difference between UITableViewCellAccessoryDetailDisclosureButton and UITableViewCellAccessoryDetailDisclosureButton?
Apple HIG suggests that you use UITableViewCellAccessoryDisclosureIndicator to navigate through hierarchical data, and UITableViewCellAccessoryDetailDisclosureButton to perform some action, possible bringing up an edit view, that may change the data. However, most programmers seem to ignore this.
You can implement the delegate method tableView:didSelectRowAtIndexPath: like this:
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
[self tableView:tableView didSelectRowAtIndexPath:indexPath];
}
Or vice versa.
There is difference. UITableViewCellAccessoryDetailDisclosureButton is actually a button but UITableViewCellAccessoryDisclosureIndicator is not.
You can use UITableViewCellAccessoryDisclosureIndicator instead of UITableViewCellAccessoryDetailDisclosureButton but you can not get the tableView:accessoryButtonTappedForRowWithIndexPath: method called when you tap on the UITableViewCellAccessoryDisclosureIndicator as it is not a button.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With