A simple keyboard to use with numbers and, optionally, a decimal point.
Clone or download
Latest commit 426d0e2 Mar 12, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Classes
Demo.xcodeproj Added support to disable the return key automatically. Feb 13, 2018
Demo Added the implementation. Dec 10, 2015
Images Added the implementation. Dec 10, 2015
MMNumberKeyboard.xcodeproj Make the header public Jun 10, 2016
.gitignore Add Carthage/Build/ to .gitignore Jun 10, 2016
Info.plist Add a dynamic framework target and scheme Jun 10, 2016
LICENSE Added the implementation. Dec 10, 2015
MMNumberKeyboard.podspec Updated .podspec Mar 12, 2018
README.md Add Carthage instructions to the README Jun 10, 2016
UniversalScreenshot.png Updated artwork. Sep 16, 2017

README.md

MMNumberKeyboard

A simple keyboard to use with numbers and, optionally, a decimal point.

And it works great on the iPad too

Installation

From CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like MMNumberKeyboard in your projects. First, add the following line to your Podfile:

pod 'MMNumberKeyboard'

Second, install MMNumberKeyboard into your project:

pod install

From Carthage

Carthage is a dependency manager for Objective-C and Swift. Add the following line to your Cartfile:

github "matmartinez/MMNumberKeyboard"

The run carthage update.

Follow the current instructions in Carthage's README for up to date installation instructions.

Usage

There is a sample Xcode project available. Just build & run. And profit.

Basically you instantiate your own keyboard view to use as an .inputView of your UITextField, UITextView or whatever view that supports text editing.

// Create and configure the keyboard.
MMNumberKeyboard *keyboard = [[MMNumberKeyboard alloc] initWithFrame:CGRectZero];
keyboard.allowsDecimalPoint = YES;
keyboard.delegate = self;

// Configure an example UITextField.
UITextField *textField = [[UITextField alloc] initWithFrame:CGRectZero];
textField.inputView = keyboard;

You can adopt the MMNumberKeyboardDelegate protocol to handle the return key or whether text should be inserted or not.

Development

Pull requests are welcome and mostly appreciated.

Credits

Thanks to Pedro Burón for the encouragement and moral support to make this README file possible.