Skip to content
This repository has been archived by the owner on Apr 14, 2018. It is now read-only.

azu/NumericKeypad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published