You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the UIDropDown is put with another custom class in a view controller, the selection (didSelectRowAt indexPath) fails to work. In the showTable() function, I added
var tap = UITapGestureRecognizer(target: self, action: #selector(self.didTap))
table.addGestureRecognizer(tap)
and added the following function:
func didTap(onTableView recognizer: UIGestureRecognizer) {
var tapLocation: CGPoint = recognizer.location(in: table)
var indexPath: IndexPath? = table.indexPathForRow(at: tapLocation)
if indexPath != nil {
//we are in a tableview cell, let the gesture be handled by the view
recognizer.cancelsTouchesInView = false
print(indexPath)
}
}
The text was updated successfully, but these errors were encountered:
When the UIDropDown is put with another custom class in a view controller, the selection (didSelectRowAt indexPath) fails to work. In the showTable() function, I added
and added the following function:
The text was updated successfully, but these errors were encountered: