Code Monkey home page Code Monkey logo

scnumberkeyboard's Introduction

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

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 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系统语言即可。

scnumberkeyboard's People

Contributors

shicang1990 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.