Disclosure Indicator not triggering accessory action segue

久未见 提交于 2019-12-11 05:28:17

问题


I'm trying to segue from a tableview to a viewcontroller embedded in a navigation controller using a show accessory action segue and the disclosure indicator (Shown in picture). Clicking anything including the disclosure icon does nothing. If I change the segue from "accessory action" to "selection," the segue works, but thats through clicking anywhere in the tableview cell as intended. My goal is to use "accessory action" to segue only when the disclosure indicator is pressed.

I know there are programmatic ways of doing this but those aren't working either. I'm assuming the underlying issue preventing this operation through a navigation controller is also preventing the programmatic methods from working. How do I get the disclosure indicator to segue to another view controller?


回答1:


accessorybuttontappedforrowwith only works when the accessory type is equal to "detail disclosure" AND accessory view is nil. Therefore it will never work with "disclosure indicator."

Days of research tell me that the community consensus is that there is no explanation as to why this is other than thats what apple engineers decided and that the "disclosure indicator" is simply symbolic as opposed to a button from which methods can be invoked. Most agree that it doesn't make any sense given the existence of the above method.



来源:https://stackoverflow.com/questions/44618823/disclosure-indicator-not-triggering-accessory-action-segue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!