BF: Registration: fix tap gesture on checkboxes in the terms screen

This commit is contained in:
manuroe 2019-01-17 11:59:21 +01:00
parent 64febced2d
commit c88676018b
2 changed files with 8 additions and 9 deletions

View file

@ -9,6 +9,7 @@ Improvements:
Bug fix:
* Use white scroll bar on dark themes (#2158)
* Registration: fix tap gesture on checkboxes in the terms screen
Changes in 0.7.11 (2019-01-08)
===============================================

View file

@ -141,16 +141,14 @@ final class TermsView: UIView, NibOwnerLoadable, UITableViewDelegate, UITableVie
cell.accessoryType = .disclosureIndicator
cell.backgroundColor = UIColor.clear
if let checkBox = cell.checkBox, checkBox.gestureRecognizers?.isEmpty ?? true {
let gesture: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(didTapCheckbox))
gesture.numberOfTapsRequired = 1
gesture.numberOfTouchesRequired = 1
let gesture: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(didTapCheckbox))
gesture.numberOfTapsRequired = 1
gesture.numberOfTouchesRequired = 1
cell.checkBox.tag = indexPath.row
cell.checkBox?.isUserInteractionEnabled = true
if (cell.checkBox?.gestureRecognizers?.count == 0) {
cell.checkBox?.addGestureRecognizer(gesture)
checkBox.isUserInteractionEnabled = true
checkBox.tag = indexPath.row
checkBox.addGestureRecognizer(gesture)
}
return cell