a swipe password view to unlock an application written in objective-c
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
- Copy the YLSwipeLockView folder to your project.
- Add YLSwipeLockView as a subview wherever you want and 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.
}
This code is distributed under the terms and conditions of the MIT license.