简体   繁体   中英

Segue not performing

I'm currently facing something I find rather strange. In my storyboard, there is a TableViewController filled with static cells.

I would like to perform a simple segue (a push to another view controller) when I select one of the rows. So I "ControlDrag" from the concerned table cell to the sibling controller, but when tap one the cell, nothing happens. Next to that, I did try assigning the segue triggering to the accessory view of the cell (a disclosure button). And in that case, the segue is effectively triggered.

So here is my question : Should I use the "programmatic way" to handle the tap on the cell (tableview delegate methods and manual segue performing), or is there something I'm missing in the interface builder? And btw how could we explain the behavior difference with the accessory button view ?

Here is two screenshot

  • Cell selection that should trigger segue

    应当触发序列的细胞选择

    And, the accessory action which performs the segue

    辅助动作

I finally found what the problem was. I had a gesture recognizer attached to the view controller, and it was catching the tap event on the cell.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM