IngmarStein / NumericKeypad

NumericKeypad for iPad

Home Page:http://efcl.info/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

NumericKeypad for iPad

http://efcl.info/


Languages

Language:Objective-C 100.0%