CardInputField
public class CardInputField: JudoPayInputField
The CardInputField is an input field configured to detect, validate and present card numbers of various types of credit cards.
-
The card network that was detected in this field
Declaration
Swift
public var cardNetwork: CardNetwork = .Unknown
-
if it is a token payment, different validation criteria apply
Declaration
Swift
public var isTokenPayment: Bool = false
-
Delegate method implementation
Declaration
Swift
public func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool
Parameters
textField
Text field
range
Range
string
String
Return Value
boolean to change characters in given range for a textfield
-
Check if this inputField is valid
Declaration
Swift
public override func isValid() -> Bool
Return Value
true if valid input
-
Subclassed method that is called when textField content was changed
Declaration
Swift
public override func textFieldDidChangeValue(textField: UITextField)
Parameters
textField
the textfield of which the content has changed
-
The placeholder string for the current inputField
Declaration
Swift
public override func placeholder() -> NSAttributedString?
Return Value
an Attributed String that is the placeholder of the receiver
-
Boolean indicating whether the receiver has to show a logo
Declaration
Swift
public override func containsLogo() -> Bool
Return Value
true if inputField shows a Logo
-
If the receiving inputField contains a Logo, this method returns Some
Declaration
Swift
public override func logoView() -> CardLogoView?
Return Value
an optional CardLogoView
-
Title of the receiver inputField
Declaration
Swift
public override func title() -> String
Return Value
a string that is the title of the receiver
-
Hint label text
Declaration
Swift
public override func hintLabelText() -> String
Return Value
string that is shown as a hint when user resides in a inputField for more than 5 seconds