I would like to create a messaging app, and therefore I would like to allow users to select the messages.
The problem is that I can not find a way to make it so that cell gets selected only if tapped inside it on a specific view
My source code:
override func tableView(_ tableView: UITableView, willSelectRowAt indexPath: IndexPath) -> IndexPath? { let cell = tableView.cellForRow(at: indexPath) as! BubbleCell if (cell.messageBubble.wasClicked){ //? somehow return indexPath } else { return nil } } Just like in messenger.
If you click on the blank space then the cell wont be selected, but if on the message bubble (inside the cell there's a view for that) then it gets selected.
