Coder Social home page Coder Social logo

jasnig / zjlockcontroller Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 190 KB

实现了, 一个常用的手势解锁的功能, 已经封装好创建密码, 验证密码 , 修改密码, 删除密码,. 同时简单实现了类似支付宝的支付密码的输入效果, 支付宝手势解锁

License: MIT License

Objective-C 100.00%

zjlockcontroller's Introduction

ZJLockController

实现了, 一个常用的手势解锁的功能, 已经封装好创建密码, 验证密码 , 修改密码, 删除密码,. 同时简单实现了类似支付宝的支付密码的输入效果, 支付宝手势解锁

lockView.gif

- (IBAction)deleteBtnOnClick:(id)sender {
    if (![ZJLockViewController isAllreadySetPassword]) {
        NSLog(@"未曾设置过密码或者密码已经被删除");
        return;
    }
    // 初始化
    ZJLockViewController *lock = [[ZJLockViewController alloc] initWithOperationType:ZJLockOperationTypeRemove delegate:self];
    // 宽度
    lock.lockView.pwdBtnSlideLength = 64.f;
    // 线宽
    lock.lockView.lineWidth = 8;
    // 设置不同状态的图片
    [lock.lockView setBtnImage:[UIImage imageNamed:@"normal"] forState:ZJLockButtonStateNormal];
    [lock.lockView setBtnImage:[UIImage imageNamed:@"selected"] forState:ZJLockButtonStateSelected];
    [lock.lockView setBtnImage:[UIImage imageNamed:@"error"] forState:ZJLockButtonStateError];

    [self presentViewController:lock animated:YES completion:nil];
    

}

这是我写的<iOS自定义控件剖析>这本书籍中的一个demo, 如果你希望知道具体的实现过程和其他的一些常用效果的实现, 那么你应该能轻易在网上下载到免费的盗版书籍.

当然作为本书的写作者, 还是希望有人能支持正版书籍. 如果你有意购买书籍, 在这篇文章中, 介绍了书籍中所有的内容和书籍适合阅读的人群, 和一些试读章节, 以及购买链接. 在你准备购买之前, 请一定读一读里面的说明. 否则, 如果不适合你阅读, 虽然书籍售价35不是很贵, 但是也是一笔损失.

如果你希望联系到我, 可以通过简书联系到我

zjlockcontroller's People

Contributors

jasnig avatar

Stargazers

 avatar  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.