Latest 0.2.0
Homepage https://github.com/IntrepidPursuits/IPDecimalNumberPad
License MIT
Platforms ios 8.0, requires ARC
Dependencies IP-UIKit-Wisdom
Frameworks UIKit
Authors

[![CI Status](http://img.shields.io/travis/Nick Servidio/IPDecimalNumberPad.svg?style=flat)](https://travis-ci.org/Nick Servidio/IPDecimalNumberPad)
Version
License
Platform

Usage

Demo Gif

Many apps require a user to enter in a decimal value with a number pad. Oftentimes this is accomplished with a keyboard. However, displaying a number pad within your UI can also provide an enjoyable user experience (see Square Cash and Venmo). One particularly common use case is the need for users to enter an amount of currency into an app.

The classes in this library provide a quick way to introduce a number pad into your app. For those who want to get started immediately, use the IPDecimalNumberPadController. This class includes a number pad and an accompanying label that displays the value entered as US dollars.

You can change the display of this class by hiding the amountLabel property and overriding the method:

- (void)handleCurrentAmountUpdate:(NSString *)currentAmount

You can then update a different UILabel or another element that displays text. You can adjust the insets surrounding the number pad to reposition it within the IPDecimalNumberPadController.

You can also customize the IPDecimalNumberPad itself. You can assign a value to the number pad’s buttonClass property. The number pad will then use this class to instantiate the buttons included in its UI. You can also provide a rowDividerImage, columnDividerImage, and deleteButtonImage. The IPDecimalNumberPad automatically creates resizable images from the row and column divider images that you supply.

For those looking for complete customization, you can use the IPDecimalNumberPad in your own UIViewController subclass. You can use the included IPStringBackedDecimalValue to hold the current value entered into the number pad, or create your own model.

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

Installation

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

pod "IPDecimalNumberPad"

Author

Nick Servidio, [email protected]

License

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

Latest podspec

{
    "name": "IPDecimalNumberPad",
    "version": "0.2.0",
    "summary": "A number pad control consisting of digits 0-9, a decimal point and a delete button.",
    "description": "Sometimes a design requires a number pad that is not contained in a keyboard. This UIControl subclass provides a customizeable and resizeable number pad.",
    "homepage": "https://github.com/IntrepidPursuits/IPDecimalNumberPad",
    "license": "MIT",
    "authors": {
        "Nick Servidio": "[email protected]"
    },
    "source": {
        "git": "https://github.com/IntrepidPursuits/IPDecimalNumberPad.git",
        "tag": "0.2.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "IPDecimalNumberPad": "Pod/Assets/*.png"
    },
    "frameworks": "UIKit",
    "dependencies": {
        "IP-UIKit-Wisdom": [
            "0.0.7"
        ]
    }
}

Pin It on Pinterest

Share This