NumericKeypad for iPad
Objective-C
Switch branches/tags
Nothing to show
Latest commit a63dfa5 Feb 27, 2013 @azu azu Cast to NSUInteger
Permalink
Failed to load latest commit information.
NumericKeypad.xcodeproj Whitespace Feb 18, 2013
NumericKeypad Cast to NSUInteger Feb 27, 2013
.gitignore Whitespace Feb 18, 2013
README.md Added audio feedback Feb 18, 2013

README.md

What is this?

Numeric keypad

Subclass of UITextField - Numeric keypad for iPad.

Usage

  1. Drag the NumPadTextField foler into your project.
  2. You can use NumericKeypadTextField like this:

ViewController.h, ViewController.m

#import <UIKit/UIKit.h>
#import "NumericKeypadDelegate.h"

@interface ViewController : UIViewController <NumericKeypadDelegate>
@end

@implementation ViewController
#pragma mark - View lifecycle
- (void)loadView {
    [super loadView];
    // UITextField Subclass
    NumericKeypadTextField *numPadTextField = [[NumericKeypadTextField alloc] init];
    numPadTextField.numericKeypadDelegate = self;// delegate for saveActionFormTextField
    numPadTextField.placeholder = @"NUMPAD";
    numPadTextField.font = [UIFont systemFontOfSize:40];
    numPadTextField.frame = CGRectMake(50, 50, 200, 40);
    [self.view addSubview:numPadTextField];
    [numPadTextField becomeFirstResponder];
}

#pragma mark - NumericKeypad delegate
- (void)saveActionFormTextField:(UITextField *)textField {
    NSLog(@"text input %@", textField.text);
}

@end

NumericKeypad is designed in Interface Builder.

License

MIT License