美文网首页
iOS 一行代码创建手势解锁页面

iOS 一行代码创建手势解锁页面

作者: Kpengs | 来源:发表于2023-02-20 11:05 被阅读0次
    效果图

    github地址:https://github.com/PZXforXcode/PZXGestureUnlock

    使用方式:

    导入PZXGestureUnlockView文件夹

    #import "PZXGesViewController.h"
    
    - (IBAction)drawGestureButtonPressed:(UIButton *)sender {
        
        PZXGesViewController *vc = [[PZXGesViewController alloc]init];
        ///创建密码
        vc.pzxUnlockType = PZXUnlockTypeCreatePwd;
        vc.modalPresentationStyle = UIModalPresentationFullScreen;
        [self presentViewController:vc animated:YES completion:nil];
        
    }
    - (IBAction)vaildGestureButtonPressed:(UIButton *)sender {
        
        PZXGesViewController *vc = [[PZXGesViewController alloc]init];
        ///验证密码
        vc.pzxUnlockType = PZXUnlockTypeValidatePwd;
        vc.modalPresentationStyle = UIModalPresentationFullScreen;
        [self presentViewController:vc animated:YES completion:nil];
        
    }
    - (IBAction)deleteGestureButtonPressed:(UIButton *)sender {
        ///删除密码
            [PZXGesViewController deleteGesturePwd];
    }
    

    相关文章

      网友评论

          本文标题:iOS 一行代码创建手势解锁页面

          本文链接:https://www.haomeiwen.com/subject/fnxgkdtx.html