加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

objective-c – UITableViewCellAccessoryDe??tailDisclosureBut

发布时间:2020-12-14 17:59:47 所属栏目:百科 来源:网络整理
导读:我创建了一个方法 – (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath { 对于UITableViewCellAccessoryDe??tailDisclosureButton. 现在我想使用UITableViewCellAccessoryDisclosureIndicato
我创建了一个方法 – (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
对于UITableViewCellAccessoryDe??tailDisclosureButton.

现在我想使用UITableViewCellAccessoryDisclosureIndicator代替UITableViewCellAccessoryDe??tailDisclosureButton.

UITableViewCellAccessoryDe??tailDisclosureButton和UITableViewCellAccessoryDe??tailDisclosureButton之间有什么区别吗?

解决方法

Apple HIG建议您使用UITableViewCellAccessoryDisclosureIndicator浏览分层数据,并使用UITableViewCellAccessoryDe??tailDisclosureButton执行某些操作,可能会调出可能会更改数据的编辑视图.但是,大多数程序员似乎忽略了这一点.

你可以实现委托方法tableView:didSelectRowAtIndexPath:像这样:

- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
    [self tableView:tableView didSelectRowAtIndexPath:indexPath];
}

或相反亦然.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读