AppLocker
AppLocker copied to clipboard
BackgroundColor of pinview indicator rectangle!
When filling in the pin code, the indicator will not be round but square.
Hi,
I have added two lines to drawing function like below and problem solved!
private func drawing(isNeedClear: Bool, tag: Int? = nil) { // Fill or cancel fill for indicators
let results = pinIndicators.filter { $0.isNeedClear == isNeedClear }
let pinView = isNeedClear ? results.last : results.first
pinView?.isNeedClear = !isNeedClear
pinView?.layer.cornerRadius = 0.5 * (pinView?.bounds.size.width)! // add these lines
pinView?.clipsToBounds = true
UIView.animate(withDuration: ALConstants.duration, animations: {
pinView?.backgroundColor = isNeedClear ? .clear : .white
}) { _ in
isNeedClear ? self.pin = String(self.pin.dropLast()) : self.pincodeChecker(tag ?? 0)
}
}