I have 3 UIViews, layered on top of one large uiview. I want to know if the user touches the top one and not care about the other ones. I will have a couple of buttons in th
My swift version to check that touch took place in infoView:
override func touchesBegan(_ touches: Set, with event: UIEvent?) { guard let touch = touches.first, infoView.bounds.contains(touch.location(in: infoView)) else { return } print("touchesBegan") // Replace by your own code } // touchesBegan