Latest 0.0.5
Homepage https://github.com/JoslynWu/CSPasswordPanal
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

一个优美而方便的密码验证面板。有忘记密码功能。可配置密码位数,已经做好屏幕适配。

效果图

怎么接入

直接将下面文件(在CSPasswordPanal文件夹中)添加(拖入)项目中

CSPwdPanalViewController.h
CSPwdPanalViewController.m

怎么用

调用一个类方法即可

+ (void)showPwdPanalWithEntry:(UIViewController *)entyVc config:(void(^)(CSPwdPanalViewController *panal))panal confirmComplete:(void(^)(NSString *pwd))confirmBlock forgetPwdBlock:(void(^)())forgetPwdBlock;

Example:

    使用默认配置:
    [CSPwdPanalViewController showPwdPanalWithEntry:self config:nil confirmComplete:^(NSString *pwd) {
        NSLog(@"-->%@",pwd);
    } forgetPwdBlock:^{
        NSLog(@"-->Do find back password logic.");
    }];

    自定义配置:
    [CSPwdPanalViewController showPwdPanalWithEntry:self config:^(CSPwdPanalViewController *panal) {
        // Config this password panal
        panal.pwdNumCount = 5;
    } confirmComplete:^(NSString *pwd) {
        NSLog(@"-->%@",pwd);
    } forgetPwdBlock:^{
        NSLog(@"-->Do find back password logic.");
    }];

哪些属性可配置

有三个可以配置属性:

@property (nonatomic, strong) NSString *panalTitle;     // 面板title。默认文字“密码验证”
@property (nonatomic, assign) NSInteger pwdNumCount;    // 密码总位数。默认为6。
@property (nonatomic, strong) UIColor *activeColor;     // 提交按钮激活时的颜色。默认#909090
@property (nonatomic, strong) UIColor *normolColor;     // 提交按钮未激活时的颜色。默认#12c286

怎么Clone

git clone --recursive https://github.com/JoslynWu/CSPasswordPanal.git

Latest podspec

{
    "name": "CSPasswordPanal",
    "version": "0.0.5",
    "summary": "A beautiful and convenient password authentication panel.",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Joslyn": "[email protected]"
    },
    "homepage": "https://github.com/JoslynWu/CSPasswordPanal",
    "social_media_url": "http://www.jianshu.com/u/fb676e32e2e9",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/JoslynWu/CSPasswordPanal.git",
        "tag": "0.0.5"
    },
    "requires_arc": true,
    "source_files": "CSPasswordPanal/*.{h,m}",
    "public_header_files": "CSPasswordPanal/*.{h}",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This