简体   繁体   中英

Tableview didSelectRowAtIndexPath

I have UITableView and CustomCell also i use didSelectRowAtIndexPath to select row.

My problem is that cell is marked by clicking on it heavily to the left . How I click in the middle or on the right nothing happens . Anyone knows the solution ?

EDIT :

its my cell screenshot

enter image description here

If I click in middle or right nothing happens but if i click on left imageView i call my function and cell is selected

I don't have details about the view hierarchy in your custom cell but I suspect the problem is the key responder.

I mean, I guess you have a button, view with tap gesture… something that capture your tap and doesn't allow to the tap reach the cell. Analyze your view hierarchy.

See the image:

查看单元格中的层次结构

Could you give me more details about the view hierarchy please?

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