Latest0.5.3
Homepagehttps://github.com/shicang1990/SCNumberKeyBoard
LicenseMIT
Platformsios 7.0, requires ARC
Authors

SCNumberKeyBoard

  • A Money Number KeyBoard Like AliPay Money Number KeyBoard.
  • You can use code, xib and storyboard.

Installation

Use the CocoaPods.

In your Podfile

pod 'SCNumberKeyBoard'

Get SCNumberKeyBoard

#import "SCNumberKeyBoard.h"

Or

Drag SCNumberKeyBoardDemo/Classes and SCNumberKeyBoardDemo/Resources/ folder into your project

#import "SCNumberKeyBoard.h"

Previews

SCNumberKeyBoard

How To Use

[SCNumberKeyBoard showOnViewController:<#viewController#> enterButtonTitle:nil enter:^(UITextField *textField, NSString *number) {
        NSLog(@"textField:%@ - number:%@", textField, number);
    } close:^(UITextField *textField, NSString *number) {
        NSLog(@"textField:%@ - number:%@", textField, number);
}];

Or

[SCNumberKeyBoard showWithTextField:<#textField#> enter:^(UITextField *textField, NSString *number) {
        NSLog(@"textField:%@ - number:%@", textField, number);
    } close:^(UITextField *textField, NSString *number) {
        NSLog(@"textField:%@ - number:%@", textField, number);
}];

Localization

Localization include Chinese and English, you can add other by yourself. Change localization you should edit Info.plist.

Use localization that you should change iOS system language.


金额输入键盘

  • 可以同时在代码和Xib以及Storyboard中使用。
  • 只需要简单一句代码即可搞定麻烦的金额输入控制。

如何使用SCNumberKeyBoard

Cocoapods:

  • cocoapods导入:pod 'SCNumberKeyBoard'

手动导入:

  • SCNumberKeyBoardDemo/ClassesSCNumberKeyBoardDemo/Resources/文件夹中的所有文件拽入项目中
  • 导入主头文件:#import "SCNumberKeyBoard.h"

效果图

SCNumberKeyBoard

加入代码

[SCNumberKeyBoard showOnViewController:<#viewController#> enterButtonTitle:nil enter:^(UITextField *textField, NSString *number) {
        NSLog(@"textField:%@ - number:%@", textField, number);
    } close:^(UITextField *textField, NSString *number) {
        NSLog(@"textField:%@ - number:%@", textField, number);
}];

或者

[SCNumberKeyBoard showWithTextField:<#textField#> enter:^(UITextField *textField, NSString *number) {
        NSLog(@"textField:%@ - number:%@", textField, number);
    } close:^(UITextField *textField, NSString *number) {
        NSLog(@"textField:%@ - number:%@", textField, number);
}];

本地化

本地化只包含了中文和英文,其他语言自行添加。

使用本地化,改变iOS系统语言即可。

Latest podspec

{
    "name": "SCNumberKeyBoard",
    "version": "0.5.3",
    "summary": "A Money Number KeyBoard Like AliPay Money Number KeyBoard.",
    "description": "## SCNumberKeyBoardn* A Money Number KeyBoard Like AliPay Money Number KeyBoard.n* You can use code, xib and storyboard.nn## InstallationnUse the [CocoaPods](http://github.com/CocoaPods/CocoaPods).nnIn your Podfilen>`pod 'SCNumberKeyBoard'`nnGet SCNumberKeyBoardn>`#import "SCNumberKeyBoard.h"`nn## OrnDrag `SCNumberKeyBoardDemo/Classes` and `SCNumberKeyBoardDemo/Resources/` folder into your projectn>`#import "SCNumberKeyBoard.h"`nn## Previewsn![](http://i1.tietuku.com/56d87eac2287ab33.gif)nn## How To Usen```objcn[SCNumberKeyBoard showOnViewController:<#viewController#> enterButtonTitle:nil enter:^(UITextField *textField, NSString *number) {n        NSLog(@"textField:%@ - number:%@", textField, number);n    } close:^(UITextField *textField, NSString *number) {n        NSLog(@"textField:%@ - number:%@", textField, number);n}];n```n## Orn```objcn[SCNumberKeyBoard showWithTextField:<#textField#> enter:^(UITextField *textField, NSString *number) {n        NSLog(@"textField:%@ - number:%@", textField, number);n    } close:^(UITextField *textField, NSString *number) {n        NSLog(@"textField:%@ - number:%@", textField, number);n}];n## LocalizationnLocalization include Chinese and English, you can add other by yourself. Change localization you should edit Info.plist.nnUse localization that you should change iOS system language.nn-----------------nn## u91d1u989du8f93u5165u952eu76d8n* u53efu4ee5u540cu65f6u5728u4ee3u7801u548cXibu4ee5u53caStoryboardu4e2du4f7fu7528u3002n* u53eau9700u8981u7b80u5355u4e00u53e5u4ee3u7801u5373u53efu641eu5b9au9ebbu70e6u7684u91d1u989du8f93u5165u63a7u5236u3002nn## u5982u4f55u4f7fu7528SCNumberKeyBoardn### Cocoapods:n* cocoapodsu5bfcu5165uff1a`pod 'SCNumberKeyBoard'`n### u624bu52a8u5bfcu5165:n* u5c06`SCNumberKeyBoardDemo/Classes`u548c`SCNumberKeyBoardDemo/Resources/`u6587u4ef6u5939u4e2du7684u6240u6709u6587u4ef6u62fdu5165u9879u76eeu4e2dn* u5bfcu5165u4e3bu5934u6587u4ef6uff1a`#import "SCNumberKeyBoard.h"`nn## u6548u679cu56fen![](http://i1.tietuku.com/56d87eac2287ab33.gif)nn## u52a0u5165u4ee3u7801n```objcn[SCNumberKeyBoard showOnViewController:<#viewController#> enterButtonTitle:nil enter:^(UITextField *textField, NSString *number) {n        NSLog(@"textField:%@ - number:%@", textField, number);n    } close:^(UITextField *textField, NSString *number) {n        NSLog(@"textField:%@ - number:%@", textField, number);n}];n```n## u6216u8005n```objcn[SCNumberKeyBoard showWithTextField:<#textField#> enter:^(UITextField *textField, NSString *number) {n        NSLog(@"textField:%@ - number:%@", textField, number);n    } close:^(UITextField *textField, NSString *number) {n        NSLog(@"textField:%@ - number:%@", textField, number);n}];n```n## u672cu5730u5316nu672cu5730u5316u53eau5305u542bu4e86u4e2du6587u548cu82f1u6587uff0cu5176u4ed6u8bedu8a00u81eau884cu6dfbu52a0u3002nnu4f7fu7528u672cu5730u5316uff0cu6539u53d8iOSu7cfbu7edfu8bedu8a00u5373u53efu3002",
    "homepage": "https://github.com/shicang1990/SCNumberKeyBoard",
    "screenshots": "http://i1.tietuku.com/56d87eac2287ab33.gif",
    "license": "MIT",
    "authors": {
        "ShiCang": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/shicang1990/SCNumberKeyBoard.git",
        "tag": "0.5.3"
    },
    "source_files": "Classes/*.{h,m}",
    "resources": "Resources/SCNumberKeyBoard.bundle",
    "requires_arc": true
}

Pin It on Pinterest

Share This