So I have a UITableView with a custom UITableViewCell which has its own custom child view.
In iOS 12, above custom child view could be touched, it would not select the whole Table View Cell.
In iOS 13 Beta, touching custom child view also highlights/selects the whole Table View Cell.
final class myTableView: UITableViewController {
.......
override final func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)
{
//Do things for table view cell selection
}
.......
}
final class CustomChildView : UIView {
........
override final func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?)
{
super.touchesBegan(touches, with: event)
//Do touch down things
}
........
}
Is there a way to cancel table view cell selection when the custom child is touched?

Your problem is that the
viewis automatically passing the selection to theparentas well.What you need to do is override the
setSelectedfunction of thechild custom viewso that it would not propagate the selection to the upper nodes of theUItree.In Reinder's Blog, you have 6 different methods (some of them well known design patterns) of passing data between
view controllers, including working withproperties,seguesandNSNotificationCenter