UITextContentType creditCardNumber is not working

54 views Asked by At

We attempted to set the contentType of UITextField to suggest hint about the added credit card number. Following code has been used :-

txtField.returnKeyType = .done

txtField.placeholder = "Card Number"

txtField.keyboardType = .default

txtField.textContentType = .creditCardNumber

We are not getting the expected suggestions about credit card no. We have added one credit card in Account’s Payment & Shipping section. Please help if I am missing something here.

0

There are 0 answers