Latest 1.0.2
License MIT
Platforms ios 7.0, requires ARC
Frameworks UIKit




This is a Class help you to build a slide Captcha Quickly.

Use the basic class DWSlideCaptchaView you can customsize the bgImage/thumpShape/identifyPoint/successAnimation/failAnimation.

By the way I provide two protocol method which may be called when the identifyAnimation willStart and didFinished.You can use these two method to customsize you captchaView better.

If you want you combine the CaptchaView with a slider(usually you may use a slider to change the value of thumb,you may also use -touchBegan to move it to point) just use The DWDefaultSlideCaptchaView or customsize it as you want.

When you are customsizing the captchaView you may just focus on how the set the thumb currentPoint and when should you do the identify.You can easily find it in DWDefaultSlideCaptchaView.





如果你想将验证视图与一个滑块组合在一起(通常是有滑块去改变验证滑块的位置,当然你也可以通过 -touchBegan 方法控制验证滑块的位置),你可以使用 DWDefaultSlideCaptchaView 或者 按照你自己的想法去定制他。

当你要定制一个验证视图是,你只需要关心如何改变验证滑块的位置以及触发验证方法的时机。你可以在 DWDefaultSlideCaptchaView 中轻松的找到相关实现,当然我只是提供了一个简单的思路。


Firstly,drag it into your project or use cocoapods.

pod 'DWSlideCaptchaView'

To use the DWSlideCaptchaView,you may just need to know at least three API

///To get an instance of it.
-(instancetype)initWithFrame:(CGRect)frame bgImage:(UIImage *)bgImage;

///Move the thumb
-(void)moveToPoint:(CGPoint)point animated:(BOOL)animated

///Identify and get an result In the block
-(void)indentifyWithAnimated:(BOOL)animated result:(void(^)(BOOL success))result

With these three Method you can implement the Captcha.

To use it in anyway you could change same of the property to modify its perform.But what you should pay attention to is you should use -beginConfigration before set value to property and -commitConfigration after set value to property otherwise the new property will not be set or worked.

As said above,there are two protocol method that tell you the identifyAnimation’s status,use it to customsize you captchaView.And follow the thought of DWDefaultSlideCaptchaView to create your own captchaView.



pod 'DWSlideCaptchaView'


-(instancetype)initWithFrame:(CGRect)frame bgImage:(UIImage *)bgImage;

-(void)moveToPoint:(CGPoint)point animated:(BOOL)animated

-(void)indentifyWithAnimated:(BOOL)animated result:(void(^)(BOOL success))result



Contact With Me

You may issue me on my Github or send me a email at [[email protected]]() to tell me some advices or the bug,I will be so appreciated.

If you like it please give a star.


你可以通过在我的Github上给我留言或者给我发送电子邮件[[email protected]]()来给我提一些建议或者指出我的bug,我将不胜感激。


Latest podspec

    "name": "DWSlideCaptchaView",
    "version": "1.0.2",
    "summary": "A view to help you to do the slide captcha.",
    "description": "A view to help you to do the slide captcha.You can customsize it as you want.",
    "homepage": "",
    "social_media_url": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "codeWicky": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.0.2"
    "source_files": "DWSlideCaptchaView/*.{h,m}",
    "platforms": {
        "ios": "7.0"
    "frameworks": "UIKit",
    "requires_arc": true

Pin It on Pinterest

Share This