Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/podkovyrin/apnumberpad
Full clone of iOS number keyboard with the customizable function button.
https://github.com/podkovyrin/apnumberpad
ios keyboard objective-c swift
Last synced: about 4 hours ago
JSON representation
Full clone of iOS number keyboard with the customizable function button.
- Host: GitHub
- URL: https://github.com/podkovyrin/apnumberpad
- Owner: podkovyrin
- License: mit
- Created: 2014-05-16T15:52:37.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-11-10T09:02:19.000Z (about 2 years ago)
- Last Synced: 2025-01-20T20:37:33.251Z (19 days ago)
- Topics: ios, keyboard, objective-c, swift
- Language: Objective-C
- Homepage:
- Size: 677 KB
- Stars: 294
- Watchers: 11
- Forks: 46
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# APNumberPad
[![CI Status](http://img.shields.io/travis/podkovyrin/APNumberPad.svg?style=flat)](https://travis-ci.org/podkovyrin/APNumberPad)
[![Version](https://img.shields.io/cocoapods/v/APNumberPad.svg?style=flat)](http://cocoapods.org/pods/APNumberPad)
[![License](https://img.shields.io/cocoapods/l/APNumberPad.svg?style=flat)](http://cocoapods.org/pods/APNumberPad)
[![Platform](https://img.shields.io/cocoapods/p/APNumberPad.svg?style=flat)](http://cocoapods.org/pods/APNumberPad)APNumberPad is a custom keyboard for iOS allows you to create a keyboard `inputView` that looks and feels just like the iPhone keyboard with `UIKeyboardTypeNumberPad` as `keyboardType`. Also APNumberPad provides customizable left-function button.
## Features
- FULLY repeats default iOS keyboard look'n'feel (input with "tap by tap", pan over keyboard and release finger on button, holding clear button, ...)
- Device rotation
- Customizable left function button
- Customizable keyboard appearence (see `APNumberPadStyle.h`)
- `UITextField` and `UITextView` support (or any other `UIResponder` object that responds to `UITextInput` protocol)
- Input clicks
- iPhone X (safe area) support## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
```obj-c
// in .h:
#import@interface ExampleViewController : UIViewController
// in .m:
UITextField *textField = [[UITextField alloc] initWithFrame:CGRectZero];
textField.inputView = ({
APNumberPad *numberPad = [APNumberPad numberPadWithDelegate:self];
// configure function button
//
[numberPad.leftFunctionButton setTitle:@"Func" forState:UIControlStateNormal];
numberPad.leftFunctionButton.titleLabel.adjustsFontSizeToFitWidth = YES;
numberPad;
});#pragma mark - APNumberPadDelegate
- (void)numberPad:(APNumberPad *)numberPad functionButtonAction:(UIButton *)functionButton textInput:(UIResponder *)textInput {
[textInput insertText:@"#"];
}
```## Requirements
iOS 8.0 or later.## Notes
Inspired by https://github.com/kulpreetchilana/Custom-iOS-Keyboards and http://stackoverflow.com/questions/13205160/how-do-i-retrieve-keystrokes-from-a-custom-keyboard-on-an-ios-app/13205494#13205494APNumberPad very gratefully makes use of backspace icon from Typicons set by Stephen Hutchings (http://typicons.com/), under Creative Commons (Attribution-Share Alike 3.0 Unported) license.
## Installation via CocoaPods
APNumberPad is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "APNumberPad"
```## Installation via Carthage
[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.
You can install Carthage with [Homebrew](http://brew.sh/) using the following command:
```bash
$ brew update
$ brew install carthage
```To integrate APNumberPad into your Xcode project using Carthage, specify it in your `Cartfile`:
```ogdl
github "podkovyrin/APNumberPad"
```## Author
Andrew Podkovyrin, [email protected]
## License
APNumberPad is available under the MIT license. See the LICENSE file for more info.