Giter Club home page Giter Club logo

nhgraphcoderpro's Introduction

NHGraphCoderPro

本地图形验证码 先上效果(v2.0 持续更新)

如果对你有帮助,请亮个 star!

image

Dependency:

  • FBShimmering:facebook开源组件,Git地址
  • JGAFImageCache:Git开源组件,Git地址

Features:

1,支持本地图片作为验证码模板,无需后台支持
2,支持网络图片作为验证码模版(只需一个URL)
3,可统计验证成功、失败次数(自己计数)
4,不依赖于其他平台闭源SDK、framework

Usage:

使用比较简单

创建:

  • 本地图片验证
	//native image to detect
	CGSize size = self.view.bounds.size;
    UIImage *img__ = [UIImage imageNamed:@"test_4.jpg"];
    NHGraphCoder *coder = [NHGraphCoder codeWithImage:img__];
    coder.center = CGPointMake(size.width*0.5, size.height*0.5);
    [coder handleGraphicCoderVerifyEvent:^(NHGraphCoder * _Nonnull cd, BOOL success) {
        NSLog(@"验证结果:%d",success);
    }];
    [self.view addSubview:coder];
  • 网络图片验证
	//network image to detect
    NSString *url = @"http://pic.pimg.tw/loloto/1357207442-1350656755_l.jpg?v=1357207447";
    NHGraphCoder *coder = [NHGraphCoder codeWithURL:url];
    coder.center = CGPointMake(size.width*0.5, size.height*0.5);
    [coder handleGraphicCoderVerifyEvent:^(NHGraphCoder * _Nonnull cd, BOOL success) {
        NSLog(@"验证结果:%d",success);
    }];
    [self.view addSubview:coder];

刷新图形:

	[coder resetStateForDetect];

Feedback:

[email protected]

nhgraphcoderpro's People

Contributors

namo-py avatar

Watchers

James Cloos avatar CoderGao 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.