Giter Club home page Giter Club logo

cbpinentryview's Introduction

CBPinEntryView

Version License Platform

CBPinEntryView is a view written in Swift to allow easy and slick entry of pins or codes. It allows backspacing, dismissal of keyboard and continuation, the whole code is given as a single String or Int and the view is very easily customisable in code or the storyboard. Now with secure entry option!

Showing easy entry and deletion

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 with either entryView.getPinAsString() or entryView.getPinAsInt(). Secure entry with customisable secure character (change from ● to ✱ or any other character). Enable isSecure.

There is now also an error mode which can be toggled with entryView.toggleError(). It is automatically removed if the user taps on the field or starts typing again.

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 @ #)

Author

Chris Byatt, [email protected]

License

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

cbpinentryview's People

Contributors

alissonenz avatar axenovv avatar fawxy avatar vvit avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.