                 newCharacter != "" {
                 button.setTitle(newCharacter, for: .normal)
                 button.setTitleColor(.black, for: .normal)
-                button.layer.borderColor = (state?.completedBorderColor ?? .lightGray).cgColor
+                button.layer.borderColor = state?.completedBorderColor.cgColor
             }
             else {
                 button.setTitle(showsPlaceholder ? state?.pin?.uppercased()[i] : nil, for: .normal)

    @objc @IBInspectable fileprivate var allowsBackspace: Bool = false
    @objc @IBInspectable fileprivate var showsPlaceholder: Bool = true
    @objc @IBInspectable fileprivate var allowsAllCharacters: Bool = false
    @objc @IBInspectable fileprivate var completedBorderColor: UIColor = .green
    
    public override var canBecomeFirstResponder: Bool {
        return textField.canBecomeFirstResponder

        becomeFirstResponder()
    }
    
    func updateButtonStates(overrideFocusBorderColor: UIColor? = nil, overrideInactiveBorderColor: UIColor? = nil) {
        let showsPlaceholder = state?.showsPlaceholder == true
        
        for (i, button) in buttons.enumerated() {
