From 2c6bf3096b5a1ae2d337174ceed0994b5139a2f6 Mon Sep 17 00:00:00 2001 From: Igor Makarov Date: Tue, 26 Nov 2019 17:09:54 +0200 Subject: [PATCH] fix accessory button text label not disappearing --- Pod/Classes/UI/CardTextField.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pod/Classes/UI/CardTextField.swift b/Pod/Classes/UI/CardTextField.swift index 192bd66..93c3092 100644 --- a/Pod/Classes/UI/CardTextField.swift +++ b/Pod/Classes/UI/CardTextField.swift @@ -434,7 +434,7 @@ open class CardTextField: UITextField, NumberInputTextFieldDelegate { if let buttonImage = cardTextFieldDelegate?.cardTextFieldShouldShowAccessoryImage(self) { let scaledImage = buttonImage.resizableImage(withCapInsets: UIEdgeInsets.zero, resizingMode: .stretch) - accessoryButton?.titleLabel?.text = nil + accessoryButton?.setTitle(nil, for: UIControl.State()) accessoryButton?.setImage(scaledImage, for: UIControl.State()) accessoryButton?.tintColor = numberInputTextField?.textColor }