long before I ask about it, I will try other solutions, and it does not work.
this is my code
override func viewDidLoad() {
super.viewDidLoad()
let tapGesture = UITapGestureRecognizer(target: self, action: "didTouchBoard:")
view.addGestureRecognizer(tapGesture)
tapGesture.cancelsTouchesInView = true
}
when I click anywhere, it will hide the keyboard if it exists, but if I click on tableviewcell or collectionviewcell, it will not click
I will try this tapGesture.cancelsTouchesInView but not working
source
share