iOS 滑动解锁应用:YLSwipeLockView

jopen 9年前

YLSwipeLockView 是一个用 swift 写成的滑动解锁应用程序。

iOS 滑动解锁应用:YLSwipeLockView

Requirements

YLSwipeLockView works on iOS 6.0 and later version and is compatible with ARC projects. It depends on the following Apple frameworks, which should already be included with most Xcode templates:

  • Foundation.framework
  • UIKit.framework
  • CoreGraphics.framework
  • QuartzCore.framework

Usage

  1. Copy the YLSwipeLockView folder to your project.
  2. Add YLSwipeLockView as a subview wherever you want add set a delegate to this YLSwipeLockView.
YLSwipeLockView *lockView = [[YLSwipeLockView alloc] initWithFrame:CGRectMake(20, self.view.bounds.size.height - viewHeight - 40 - 100, viewWidth, viewHeight)];  [self.view addSubview:lockView];  self.lockView = lockView;  self.lockView.delegate = self;    -(YLSwipeLockViewState)swipeView:(YLSwipeLockView *)swipeView didEndSwipeWithPassword:(NSString *)password  {      //everytime user finish a swipe, this method get called and pass a password, add your logic here.    }

项目主页:http://www.open-open.com/lib/view/home/1426820363523