Fawxy / CBPinEntryView

A customisable view for entering arbitrary length pins, codes or passwords in iOS. Supports iOS 12 one time codes.
MIT License
189 stars 41 forks source link

Added textContentType attribute #12

Closed freemansion closed 5 years ago

freemansion commented 6 years ago

Added textContentType attribute in order to support semantic intention and features like autofill OTP code.

Usage:

        if #available(iOS 12, *) {
            pinEntryView.textContentType = .oneTimeCode
        }

This pr solves issue #11 Pay attention, that autofill will not work with third-party keyboards for security reasons.

More info at Apple Docs - https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_a_text_input_view