ProductPromotion
Logo

Swift

made by https://0x3d.site

GitHub - Fawxy/CBPinEntryView: A customisable view for entering arbitrary length pins, codes or passwords in iOS. Supports iOS 12 one time codes.
A customisable view for entering arbitrary length pins, codes or passwords in iOS. Supports iOS 12 one time codes. - Fawxy/CBPinEntryView
Visit Site

GitHub - Fawxy/CBPinEntryView: A customisable view for entering arbitrary length pins, codes or passwords in iOS. Supports iOS 12 one time codes.

GitHub - Fawxy/CBPinEntryView: A customisable view for entering arbitrary length pins, codes or passwords in iOS. Supports iOS 12 one time codes.

CBPinEntryView

Version License Platform

CBPinEntryView is a view written in Swift to allow easy and slick entry of pins, codes or passwords. It allows backspacing, dismissal of keyboard and continuing where you left off, the whole code is given as a single String or Int and the view is very easily customisable in code or the storyboard.

Preview

Enter pins easily! Communicate user error Clear the text field to retry Secure entry mode

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

CBPinEntryView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "CBPinEntryView"

Put a view into your storyboard or xib and set it's class to CBPinEntryView. Create an outlet in your file and customise either with the IBInspectable properties or in your code.

Get the code

Get the code with either entryView.getPinAsString() or entryView.getPinAsInt().

Entry callbacks

There are two delegate methods entryChanged(_ completed: Bool) and entryCompleted(with entry: String?). The first will let you know each time the entry is changed, and whether they have completed the entry. The second function will get called when the user fills out the entry to completion and the entered pin will be passed.

Secure entry

Secure entry with customisable secure character (change from ● to ✱ or any other character). Enable isSecure. Change the secure entry character by setting the secureCharacter property.

Display errors

There is an error mode which can be enabled with pinEntryView.setError(isError: true) and disabled with pinEntryView.setError(isError: false). Whether error mode is enabled can be checked with pinEntryView.errorMode. Calling pinEntryView.resignFirstResponder() will hide the keyboard and disable the error mode.

Allow or restrict characters

Set allowedEntryTypes and choose between any, numerical, alphanumeric, letters to enable or restrict characters. Set textFieldCapitalization to choose what kind of capitalisation you would like on the text field.

Customise keyboard type!

The keyboard types are an enum with int raw values. Options are as follows:

0: default // Default type for the current input method.
1: asciiCapable // Displays a keyboard which can enter ASCII characters
2: numbersAndPunctuation // Numbers and assorted punctuation.
3: URL // A type optimized for URL entry (shows . / .com prominently).
4: numberPad // A number pad with locale-appropriate digits (0-9, ۰-۹, ०-९, etc.). Suitable for PIN entry.
5: phonePad // A phone pad (1-9, *, 0, #, with letters under the numbers).
6: namePhonePad // A type optimized for entering a person's name or phone number.
7: emailAddress // A type optimized for multiple email address entry (shows space @ . prominently).
8: decimalPad // A number pad with a decimal point.
9: twitter // A type optimized for twitter text entry (easy access to @ #)

License

CBPinEntryView is available under the MIT license. See the LICENSE file for more info.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory