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

2023-02-20  本文已影响0人  Kpengs
效果图

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];
}
上一篇下一篇

猜你喜欢

热点阅读