- A Money Number KeyBoard Like AliPay Money Number KeyBoard.
- You can use code, xib and storyboard.
Use the CocoaPods.
In your Podfile
pod 'SCNumberKeyBoard'
Get SCNumberKeyBoard
#import "SCNumberKeyBoard.h"
Drag SCNumberKeyBoardDemo/Classes
and SCNumberKeyBoardDemo/Resources/
folder into your project
#import "SCNumberKeyBoard.h"
[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);
}];
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中使用。
- 只需要简单一句代码即可搞定麻烦的金额输入控制。
- cocoapods导入:
pod 'SCNumberKeyBoard'
- 将
SCNumberKeyBoardDemo/Classes
和SCNumberKeyBoardDemo/Resources/
文件夹中的所有文件拽入项目中 - 导入主头文件:
#import "SCNumberKeyBoard.h"
[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系统语言即可。