Disclosure Indicator 不会调用 seque,而 Detail Disclosure 会调用 [英] Disclosure Indicator doesn't call seque while Detail Disclosure does

查看:31
本文介绍了Disclosure Indicator 不会调用 seque,而 Detail Disclosure 会调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个有趣的问题.当人们单击表视图中的箭头时,我希望弹出详细信息屏幕.细胞是动态的.

I have an interesting problem. I'd like to have detail screen pop up when people click on the arrow in the Table View. The cells are dynamic.

当我选择 Disclosure Indicator 时 - 我没有调用 segue,也没有调用attachmentButtonTappedForRowWithIndexPath.当我将其更改为 Detail Disclosure 时,一切正常.

When I select Disclosure Indicator - I do not get the segue called and and I don't get accessoryButtonTappedForRowWithIndexPath called either. When I change it to Detail Disclosure everything works just fine.

我可以做些什么来使披露指标表现得像细节披露一样?

Any guesses to what I can do to make the disclosure indicator act just like the detail disclosure?

谢谢!

推荐答案

披露指示器不是按钮,因此不会导致 tableView:accessoryButtonTappedForRowWithIndexPath: 委托方法触发,而细节披露 一个按钮,因此会触发那个方法.

Disclosure indicators are not buttons and therefore do not cause the tableView:accessoryButtonTappedForRowWithIndexPath: delegate method to fire, while a detail disclosure is a button and therefore does fire that method.

我想,你能做的最好的事情就是在你的表格视图单元格中添加一个 UIButton 并给它一个非常类似于默认表格视图显示指示器的图像.不过,这有点像hacky 解决方案,因此我不鼓励您实际执行此操作.

The best you can hope to do, I imagine, is to add a UIButton to your table view cell and give it an image that very closely resembles the default table view disclosure indicator. This is kind of a hacky solution though, so I would discourage you from actually doing this.

这篇关于Disclosure Indicator 不会调用 seque,而 Detail Disclosure 会调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆