[翻译] JKLLockScreenViewController
JKLLockScreenViewController
https://github.com/tiny2n/JKLLockScreenViewController
Overview
It is Lock Screen Controller on platform iOS.
这是iOS平台上的锁屏控制器源码.
Feature
- Touch ID 支持指纹识别
- IB_DESIGNABLE 支持IB
- Autolayout 自动布局
- Localization 本地化
- Cocoapods 支持Cocoapods
Installation 普通安装
Add the files to your project manually by dragging the JKLLockScreenViewController directory into your Xcode project.
你可以手动将JKLLockScreenViewController文件夹拖到你的项目工程当中.
Installation with CocoaPods 通过CocoaPods安装
CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like JKLockScreenViewController in your projects. See the ["Getting Started" guide for more information].
CocoaPods是Objective-C的一个版本依赖工具,便于管理你的项目中的第三方库.
Podfile
platform :ios, '6.0'
pod 'JKLLockScreenViewController', :git => 'https://github.com/tiny2n/JKLLockScreenViewController.git' !!! if you saw follow error message
"IB Designables: Failed to update auto layout status: Failed to load designables from path (null)" add use_frameworks! to 'Podfile' file ex)
...
platform :ios, '6.0'
use_frameworks! <--------- add
...
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;
...
thanks
License
The MIT License (MIT)
Copyright (c) 2015 JoongKwan Choi
JKLib
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[翻译] JKLLockScreenViewController的更多相关文章
- 《Django By Example》第五章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者@ucag注:大家好,我是新来的翻译, ...
- 《Django By Example》第四章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:祝大家新年快乐,这次带来<D ...
- [翻译]开发文档:android Bitmap的高效使用
内容概述 本文内容来自开发文档"Traning > Displaying Bitmaps Efficiently",包括大尺寸Bitmap的高效加载,图片的异步加载和数据缓存 ...
- 【探索】机器指令翻译成 JavaScript
前言 前些时候研究脚本混淆时,打算先学一些「程序流程」相关的概念.为了不因太枯燥而放弃,决定想一个有趣的案例,可以边探索边学. 于是想了一个话题:尝试将机器指令 1:1 翻译 成 JavaScript ...
- 《Django By Example》第三章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:第三章滚烫出炉,大家请不要吐槽文中 ...
- 《Django By Example》第二章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:翻译完第一章后,发现翻译第二章的速 ...
- 《Django By Example》第一章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:本人目前在杭州某家互联网公司工作, ...
- 【翻译】Awesome R资源大全中文版来了,全球最火的R工具包一网打尽,超过300+工具,还在等什么?
0.前言 虽然很早就知道R被微软收购,也很早知道R在统计分析处理方面很强大,开始一直没有行动过...直到 直到12月初在微软技术大会,看到我软的工程师演示R的使用,我就震惊了,然后最近在网上到处了解和 ...
- ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第一章:创建基本的MVC Web站点
在这一章中,我们将学习如何使用基架快速搭建和运行一个简单的Microsoft ASP.NET MVC Web站点.在我们马上投入学习和编码之前,我们首先了解一些有关ASP.NET MVC和Entity ...
随机推荐
- java学习-struts基础(一)
struts发展 struts是Apache软件基金会赞助的一个开源项目,是一个基于Java EE的MVC开源实现. 它为Servlet/JSP技术的应用提供技术框架2001.7--Struts1正式 ...
- Golang 包依赖管理工具
1.godep:https://studygolang.com/articles/9877 2.dep:https://studygolang.com/articles/10589 3.glide:h ...
- elasticsearch插件安装之--中文分词器 ik 安装
/** * 系统环境: vm12 下的centos 7.2 * 当前安装版本: elasticsearch-2.4.0.tar.gz */ ElasticSearch中内置了许多分词器, standa ...
- elasticdump
elasticdump备份elasticsearch里面的某个索引数据 1. 安装环境 需要node.npm.yarn # 去官方下载最新版本的nodejs #wget https://nod ...
- Entity Framework取消修改
最近碰到一个场景:在Entity Framework保存错误的时候,需要将该错误记录在DB中.因为DB在savechange的时候会继续保存之前的数据,所以一直会报错,无法保存错误日志. 这就需要实现 ...
- Eclipse编辑JS响应慢,复制粘贴卡顿的解决方案
我使用的是官网标准版的eclipse4.3 for javaEE, 写JS时卡的简直无法忍受,尝试去掉所有的validate,包括菜单和项目属性中的都没作用. 整个人都急疯了~ 后来在项目根目录.pr ...
- 大数据技术之_09_Flume学习_Flume概述+Flume快速入门+Flume企业开发案例+Flume监控之Ganglia+Flume高级之自定义MySQLSource+Flume企业真实面试题(重点)
第1章 Flume概述1.1 Flume定义1.2 Flume组成架构1.2.1 Agent1.2.2 Source1.2.3 Channel1.2.4 Sink1.2.5 Event1.3 Flum ...
- Node.js之Express三
端午节3天说没就没了,自己的脚伤都快一个月了还没好,原本想着去桂林或者厦门呢,可计划赶不上变化,看自己公司C#软件工程师的招聘条件有要求MongoDb,年前就打算自己学习下,买的这本书就叫Node.j ...
- 源码速读及点睛:HashMap
Java 8 HashMap的分离链表 从Java 2到Java 1.7,HashMap在分离链表上的改变并不多,他们的算法基本上是相同的.如果我们假设对象的Hash值服从平均分布,那么获取一个对象需 ...
- vue项目引入element
前提工作-安装并配置好以下环境: 1.安装node 2.安装git 1.初始化项目 vue init webpack vue-elementui npm run dev 2.安装element np ...