What's the difference between a Detail Disclosure Button and a Disclosure Indicator?

后端 未结 2 1714
攒了一身酷
攒了一身酷 2021-01-31 03:58

What\'s the difference between a Detail Disclosure Button and a Disclosure Indicator?

For me, both things are the exact same thing, just that they look a little bit diff

2条回答
  •  失恋的感觉
    2021-01-31 04:52

    Once you use the detail disclosure button it acts like a button.
    Meaning that the user has to tap this button in order to perform some action (you can catch this tap by implementing the - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath method of the UITableViewDelegate).

    If you use the indicator then it just draws the arrow on the right and you will have to implement the - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath in order to catch the tap on the entire table cell.

    Hope it helps...

提交回复
热议问题