Skip to content

mrblog/EasyNumberPad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EasyNumberPad

Simple Number Pad for iPad

ScreenShot

Overview

We built this component for our Phew! app and decided to open-source it.

EasyNumberPad consists of a single component:

EasyNumberPadViewController - a UIViewController that contains a simple kid-styled number keypad for iPad.

EasyNumberPadViewController must be presented modally.

Use:

#import "EasyNumberPadViewController.h"

EasyNumberPadViewController *pad = [[EasyNumberPadViewController alloc] init];
pad.delegate = self;
[self presentViewController:pad animated:YES completion:nil];

See EasyNumberPadDemo for an example.

Installation

Copy the contents of the EasyNumberPad folder into your project.

Add the Slacky font to your apps Info.plist file.

<key>UIAppFonts</key>
<array>
    <string>Slackey.ttf</string>
</array>

Implementing EasyNumberPadDelegate Protocol

EasyNumberPadDelegate is a set of @required callback methods to handle the delegate messages corresponding to button actions:

-(void) done:(EasyNumberPadViewController *)controller withText:(NSString *)text;
-(void) cancelled:(EasyNumberPadViewController *)controller;

The delegate must implement the done: message to respond when a user is finished entering the numeric value. Implement the cancelled: method to take the appropriate action when the user cancels the control.

See EasyNumberPadDemo for an example.

Acknowledgements

About

Simple Number Pad for iPad

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published