iOS 屏锁:JKLLockScreenViewController
dwd4
10年前
JKLLockScreenViewController 是 iOS 上的屏锁控制。
Overview
It is Lock Screen Controller on platform iOS.
Feature
- Touch ID
- IB_DESIGNABLE
- Autolayout
- Localization
Installation
Add the files to your project manually by dragging the JKLLockScreenViewController directory into your Xcode project.
Usage
// Import the class #import "JKLLockScreenViewController.h" ... // --------------------------------------------------- // ex) JKLLockScreenViewController in UIViewController ... // --------------------------------------------------- // add UIViewController JKLLockScreenViewController * viewController = [[JKLLockScreenViewController alloc] initWithNibName:NSStringFromClass([JKLLockScreenViewController class]) bundle:nil]; [viewController setLockScreenMode:{{lock screen mode}}]; // enum { LockScreenModeNormal, LockScreenModeNew, LockScreenModeChange } [viewController setDelegate:self]; [viewController setDataSource:self]; [self presentViewController:viewController animated:YES completion:NULL]; ... // --------------------------------------------------- // Delegate // --------------------------------------------------- - (void)unlockWasSuccessfulLockScreenViewController:(JKLLockScreenViewController *)lockScreenViewController pincode:(NSString *)pincode; // support for number - (void)unlockWasSuccessfulLockScreenViewController:(JKLLockScreenViewController *)lockScreenViewController; // support for touch id - (void)unlockWasCancelledLockScreenViewController:(JKLLockScreenViewController *)lockScreenViewController; - (void)unlockWasFailureLockScreenViewController:(JKLLockScreenViewController *)lockScreenViewController; // --------------------------------------------------- // Delegate // --------------------------------------------------- - (BOOL)lockScreenViewController:(JKLLockScreenViewController *)lockScreenViewController pincode:(NSString *)pincode; - (BOOL)allowTouchIDLockScreenViewController:(JKLLockScreenViewController *)lockScreenViewController; ...