There is another potential cause for such problems, namely UITableViewCells now has a contentView . This can and will be placed in front of other views in your custom cells of the table view in order to select strokes and determine the choice of the cell. At the same time, he can block touching any species behind him. I especially noticed this annoyance when creating cells with knives.
The accepted way to deal with this is to ensure that all subitems are not added to the tableview cell itself, but to its contentView . This is a read-only property that, under certain circumstances, adjusts its own frame, for example, when it slides to the side to open the delete button or in edit mode. Therefore, you must make sure that all the elements you add to the contentView are of reasonable size and have the correct resizing behavior.
Also keep in mind that by adding cells to the contentView , you can lock it yourself, and thus prohibit cell selection. I personally try not to allow the selection of cells in table views that contain cells with custom user controls. This only leads to confusion and inconvenient interfaces. In fact, I'm seriously considering replacing all of the UITableViews in my future projects with UICollectionViews , which are much more adaptable.
-Ash
Ash
source share