Repository: XiaoYulong/YLSwipeLockView
Branch: master
Commit: 19dd9cab13fb
Files: 23
Total size: 54.9 KB
Directory structure:
gitextract_ptsou9z9/
├── .gitignore
├── LICENSE
├── README.md
├── YLSwipeLockView/
│ ├── YLSwipeLockNodeView.h
│ ├── YLSwipeLockNodeView.m
│ ├── YLSwipeLockView.h
│ └── YLSwipeLockView.m
├── YLSwipeLockViewDemo/
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj/
│ │ └── LaunchScreen.xib
│ ├── Images.xcassets/
│ │ └── AppIcon.appiconset/
│ │ └── Contents.json
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── YLCheckToUnlockViewController.h
│ ├── YLCheckToUnlockViewController.m
│ ├── YLInitSwipePasswordController.h
│ ├── YLInitSwipePasswordController.m
│ └── main.m
├── YLSwipeLockViewDemo.xcodeproj/
│ ├── project.pbxproj
│ └── project.xcworkspace/
│ └── contents.xcworkspacedata
└── YLSwipeLockViewDemoTests/
├── Info.plist
└── YLSwipeLockViewDemoTests.m
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
# Pods/
================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2015 Xiao Yulong
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.
================================================
FILE: README.md
================================================
# YLSwipeLockView
a swipe password view to unlock an application written in objective-c
<img src="example.gif"/>
## 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 and set a delegate to this YLSwipeLockView.
```objective-c
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.
}
```
## License
This code is distributed under the terms and conditions of the [MIT license](LICENSE).
================================================
FILE: YLSwipeLockView/YLSwipeLockNodeView.h
================================================
//
// YLSwipeLockNodeView.h
// YLSwipeLockViewDemo
//
// Created by 肖 玉龙 on 15/2/12.
// Copyright (c) 2015年 Yulong Xiao. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, YLSwipeLockNodeViewStatus) {
YLSwipeLockNodeViewStatusNormal,
YLSwipeLockNodeViewStatusSelected,
YLSwipeLockNodeViewStatusWarning
};
@interface YLSwipeLockNodeView : UIView
@property (nonatomic) YLSwipeLockNodeViewStatus nodeViewStatus;
@end
================================================
FILE: YLSwipeLockView/YLSwipeLockNodeView.m
================================================
//
// YLSwipeLockNodeView.m
// YLSwipeLockViewDemo
//
// Created by 肖 玉龙 on 15/2/12.
// Copyright (c) 2015年 Yulong Xiao. All rights reserved.
//
#import "YLSwipeLockNodeView.h"
#import "YLSwipeLockView.h"
@interface YLSwipeLockNodeView()
@property (nonatomic, strong)CAShapeLayer *outlineLayer;
@property (nonatomic, strong)CAShapeLayer *innerCircleLayer;
@end
@implementation YLSwipeLockNodeView
-(id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self.layer addSublayer:self.outlineLayer];
[self.layer addSublayer:self.innerCircleLayer];
self.nodeViewStatus = YLSwipeLockNodeViewStatusNormal;
}
return self;
}
-(void)pan:(UIPanGestureRecognizer *)rec
{
NSLog(@"what the fuck");
CGPoint point = [rec locationInView:self];
NSLog(@"location in view:%f, %f", point.x, point.y);
self.nodeViewStatus = YLSwipeLockNodeViewStatusSelected;
}
-(void)setNodeViewStatus:(YLSwipeLockNodeViewStatus)nodeViewStatus
{
_nodeViewStatus = nodeViewStatus;
switch (_nodeViewStatus) {
case YLSwipeLockNodeViewStatusNormal:
[self setStatusToNormal];
break;
case YLSwipeLockNodeViewStatusSelected:
[self setStatusToSelected];
break;
case YLSwipeLockNodeViewStatusWarning:
[self setStatusToWarning];
break;
default:
break;
}
}
-(void)setStatusToNormal
{
self.outlineLayer.strokeColor = [UIColor whiteColor].CGColor;
self.innerCircleLayer.fillColor = [UIColor clearColor].CGColor;
}
-(void)setStatusToSelected
{
self.outlineLayer.strokeColor = LIGHTBLUE.CGColor;
self.innerCircleLayer.fillColor = LIGHTBLUE.CGColor;
}
-(void)setStatusToWarning
{
self.outlineLayer.strokeColor = [UIColor redColor].CGColor;
self.innerCircleLayer.fillColor = [UIColor redColor].CGColor;
}
-(void)layoutSubviews
{
self.outlineLayer.frame = self.bounds;
UIBezierPath *outlinePath = [UIBezierPath bezierPathWithOvalInRect:self.bounds];
self.outlineLayer.path = outlinePath.CGPath;
CGRect frame = self.bounds;
CGFloat width = frame.size.width / 3;
self.innerCircleLayer.frame = CGRectMake(width, width, width, width);
UIBezierPath *innerPath = [UIBezierPath bezierPathWithOvalInRect:self.innerCircleLayer.bounds];
self.innerCircleLayer.path = innerPath.CGPath;
}
-(CAShapeLayer *)outlineLayer
{
if (_outlineLayer == nil) {
_outlineLayer = [[CAShapeLayer alloc] init];
_outlineLayer.strokeColor = LIGHTBLUE.CGColor;
_outlineLayer.lineWidth = 1.0f;
_outlineLayer.fillColor = [UIColor clearColor].CGColor;
}
return _outlineLayer;
}
-(CAShapeLayer *)innerCircleLayer
{
if (_innerCircleLayer == nil) {
_innerCircleLayer = [[CAShapeLayer alloc] init];
_innerCircleLayer.strokeColor = [UIColor clearColor].CGColor;
_innerCircleLayer.lineWidth = 1.0f;
_innerCircleLayer.fillColor = LIGHTBLUE.CGColor;
}
return _innerCircleLayer;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
================================================
FILE: YLSwipeLockView/YLSwipeLockView.h
================================================
//
// YLSwipeLockView.h
// YLSwipeLockViewDemo
//
// Created by 肖 玉龙 on 15/2/12.
// Copyright (c) 2015年 Yulong Xiao. All rights reserved.
//
#import <UIKit/UIKit.h>
#define LIGHTBLUE [UIColor colorWithRed:0 green:170/255.0 blue:1 alpha:1]
typedef NS_ENUM(NSUInteger, YLSwipeLockViewState) {
YLSwipeLockViewStateNormal,
YLSwipeLockViewStateWarning,
YLSwipeLockViewStateSelected
};
@protocol YLSwipeLockViewDelegate;
@interface YLSwipeLockView : UIView
@property (nonatomic, weak) id<YLSwipeLockViewDelegate> delegate;
@end
@protocol YLSwipeLockViewDelegate<NSObject>
@optional
-(YLSwipeLockViewState)swipeView:(YLSwipeLockView *)swipeView didEndSwipeWithPassword:(NSString *)password;
@end
================================================
FILE: YLSwipeLockView/YLSwipeLockView.m
================================================
//
// YLSwipeLockView.m
// YLSwipeLockViewDemo
//
// Created by 肖 玉龙 on 15/2/12.
// Copyright (c) 2015年 Yulong Xiao. All rights reserved.
//
#import "YLSwipeLockView.h"
#import "YLSwipeLockNodeView.h"
@interface YLSwipeLockView()
@property (nonatomic, strong) NSMutableArray *nodeArray;
@property (nonatomic, strong) NSMutableArray *selectedNodeArray;
@property (nonatomic, strong) CAShapeLayer *polygonalLineLayer;
@property (nonatomic, strong) UIBezierPath *polygonalLinePath;
@property (nonatomic, strong) NSMutableArray *pointArray;
@property (nonatomic) YLSwipeLockViewState viewState;
@end
@implementation YLSwipeLockView
-(id)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if (self) {
[self.layer addSublayer:self.polygonalLineLayer];
_nodeArray = [NSMutableArray arrayWithCapacity:9];
for (int i = 0; i < 9; ++i) {
YLSwipeLockNodeView *nodeView = [YLSwipeLockNodeView new];
[_nodeArray addObject:nodeView];
nodeView.tag = i;
[self addSubview:nodeView];
}
_selectedNodeArray = [NSMutableArray arrayWithCapacity:9];
_pointArray = [NSMutableArray array];
UIPanGestureRecognizer *panRec = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(pan:)];
[self addGestureRecognizer:panRec];
self.viewState = YLSwipeLockNodeViewStatusNormal;
[self cleanNodes];
}
return self;
}
-(void)pan:(UIPanGestureRecognizer *)rec
{
if (rec.state == UIGestureRecognizerStateBegan){
self.viewState = YLSwipeLockNodeViewStatusNormal;
}
CGPoint touchPoint = [rec locationInView:self];
NSInteger index = [self indexForNodeAtPoint:touchPoint];
if (index >= 0) {
YLSwipeLockNodeView *node = self.nodeArray[index];
if (![self addSelectedNode:node]) {
[self moveLineWithFingerPosition:touchPoint];
}
}else{
[self moveLineWithFingerPosition:touchPoint];
}
if (rec.state == UIGestureRecognizerStateEnded) {
[self removeLastFingerPosition];
if([self.delegate respondsToSelector:@selector(swipeView:didEndSwipeWithPassword:)]){
NSMutableString *password = [NSMutableString new];
for(YLSwipeLockNodeView *nodeView in self.selectedNodeArray){
NSString *index = [@(nodeView.tag) stringValue];
[password appendString:index];
}
self.viewState = [self.delegate swipeView:self didEndSwipeWithPassword:password];
}
else{
self.viewState = YLSwipeLockViewStateSelected;
}
}
}
-(BOOL)addSelectedNode:(YLSwipeLockNodeView *)nodeView
{
if (![self.selectedNodeArray containsObject:nodeView]) {
nodeView.nodeViewStatus = YLSwipeLockNodeViewStatusSelected;
[self.selectedNodeArray addObject:nodeView];
[self addLineToNode:nodeView];
return YES;
}else{
return NO;
}
}
-(void)addLineToNode:(YLSwipeLockNodeView *)nodeView
{
if(self.selectedNodeArray.count == 1){
//path move to start point
CGPoint startPoint = nodeView.center;
[self.polygonalLinePath moveToPoint:startPoint];
[self.pointArray addObject:[NSValue valueWithCGPoint:startPoint]];
self.polygonalLineLayer.path = self.polygonalLinePath.CGPath;
}else{
//path add line to point
[self.pointArray removeLastObject];
CGPoint middlePoint = nodeView.center;
[self.pointArray addObject:[NSValue valueWithCGPoint:middlePoint]];
[self.polygonalLinePath removeAllPoints];
CGPoint startPoint = [self.pointArray[0] CGPointValue];
[self.polygonalLinePath moveToPoint:startPoint];
for (int i = 1; i < self.pointArray.count; ++i) {
CGPoint middlePoint = [self.pointArray[i] CGPointValue];
[self.polygonalLinePath addLineToPoint:middlePoint];
}
self.polygonalLineLayer.path = self.polygonalLinePath.CGPath;
}
}
-(void)moveLineWithFingerPosition:(CGPoint)touchPoint
{
if (self.pointArray.count > 0) {
if (self.pointArray.count > self.selectedNodeArray.count) {
[self.pointArray removeLastObject];
}
[self.pointArray addObject:[NSValue valueWithCGPoint:touchPoint]];
[self.polygonalLinePath removeAllPoints];
CGPoint startPoint = [self.pointArray[0] CGPointValue];
[self.polygonalLinePath moveToPoint:startPoint];
for (int i = 1; i < self.pointArray.count; ++i) {
CGPoint middlePoint = [self.pointArray[i] CGPointValue];
[self.polygonalLinePath addLineToPoint:middlePoint];
}
self.polygonalLineLayer.path = self.polygonalLinePath.CGPath;
}
}
-(void)removeLastFingerPosition
{
if (self.pointArray.count > 0) {
if (self.pointArray.count > self.selectedNodeArray.count) {
[self.pointArray removeLastObject];
}
[self.polygonalLinePath removeAllPoints];
CGPoint startPoint = [self.pointArray[0] CGPointValue];
[self.polygonalLinePath moveToPoint:startPoint];
for (int i = 1; i < self.pointArray.count; ++i) {
CGPoint middlePoint = [self.pointArray[i] CGPointValue];
[self.polygonalLinePath addLineToPoint:middlePoint];
}
self.polygonalLineLayer.path = self.polygonalLinePath.CGPath;
}
}
-(void)layoutSubviews{
self.polygonalLineLayer.frame = self.bounds;
CAShapeLayer *maskLayer = [CAShapeLayer new];
maskLayer.frame = self.bounds;
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRect:self.bounds];
maskLayer.fillRule = kCAFillRuleEvenOdd;
maskLayer.lineWidth = 1.0f;
maskLayer.strokeColor = [UIColor blackColor].CGColor;
maskLayer.fillColor = [UIColor blackColor].CGColor;
//TODO: here should be more decent
for (int i = 0; i < self.nodeArray.count; ++i) {
YLSwipeLockNodeView *nodeView = _nodeArray[i];
// TODO: change to use MIN marco in the future
CGFloat min = self.bounds.size.width < self.bounds.size.height ? self.bounds.size.width : self.bounds.size.height;
CGFloat width = min / 5;
CGFloat height = min / 5;
int row = i % 3;
int column = i / 3;
CGRect frame = CGRectMake(row *(width * 2), column * (width *2), width, height);
nodeView.frame = frame;
[maskPath appendPath:[UIBezierPath bezierPathWithOvalInRect:frame]];
}
maskLayer.path = maskPath.CGPath;
self.polygonalLineLayer.mask = maskLayer;
}
-(NSInteger)indexForNodeAtPoint:(CGPoint)point
{
for (int i = 0; i < self.nodeArray.count; ++i) {
YLSwipeLockNodeView *node = self.nodeArray[i];
CGPoint pointInNode = [node convertPoint:point fromView:self];
if ([node pointInside:pointInNode withEvent:nil]) {
NSLog(@"点中了第%d个~~", i);
return i;
}
}
return -1;
}
-(void)cleanNodes
{
for (int i = 0; i < self.nodeArray.count; ++i) {
YLSwipeLockNodeView *node = self.nodeArray[i];
node.nodeViewStatus = YLSwipeLockNodeViewStatusNormal;
}
[self.selectedNodeArray removeAllObjects];
[self.pointArray removeAllObjects];
self.polygonalLinePath = [UIBezierPath new];
self.polygonalLineLayer.strokeColor = LIGHTBLUE.CGColor;
self.polygonalLineLayer.path = self.polygonalLinePath.CGPath;
}
-(void)cleanNodesIfNeeded{
if(self.viewState != YLSwipeLockNodeViewStatusNormal){
[self cleanNodes];
}
}
-(void)makeNodesToWarning
{
for (int i = 0; i < self.selectedNodeArray.count; ++i) {
YLSwipeLockNodeView *node = self.selectedNodeArray[i];
node.nodeViewStatus = YLSwipeLockNodeViewStatusWarning;
}
self.polygonalLineLayer.strokeColor = [UIColor redColor].CGColor;
}
-(CAShapeLayer *)polygonalLineLayer
{
if (_polygonalLineLayer == nil) {
_polygonalLineLayer = [[CAShapeLayer alloc] init];
_polygonalLineLayer.lineWidth = 1.0f;
_polygonalLineLayer.strokeColor = LIGHTBLUE.CGColor;
_polygonalLineLayer.fillColor = [UIColor clearColor].CGColor;
}
return _polygonalLineLayer;
}
-(void)setViewState:(YLSwipeLockViewState)viewState
{
// if(_viewState != viewState){
_viewState = viewState;
switch (_viewState){
case YLSwipeLockViewStateNormal:
[self cleanNodes];
break;
case YLSwipeLockViewStateWarning:
[self makeNodesToWarning];
[self performSelector:@selector(cleanNodesIfNeeded) withObject:nil afterDelay:1];
break;
case YLSwipeLockViewStateSelected:
default:
break;
}
// }
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
================================================
FILE: YLSwipeLockViewDemo/AppDelegate.h
================================================
//
// AppDelegate.h
// YLSwipeLockViewDemo
//
// Created by 肖 玉龙 on 15/2/12.
// Copyright (c) 2015年 Yulong Xiao. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
================================================
FILE: YLSwipeLockViewDemo/AppDelegate.m
================================================
//
// AppDelegate.m
// YLSwipeLockViewDemo
//
// Created by 肖 玉龙 on 15/2/12.
// Copyright (c) 2015年 Yulong Xiao. All rights reserved.
//
#import "AppDelegate.h"
#import "ViewController.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[[UIButton appearance] setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = [ViewController new];
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
@end
================================================
FILE: YLSwipeLockViewDemo/Base.lproj/LaunchScreen.xib
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015年 Yulong Xiao. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="YLSwipeLockViewDemo" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
</objects>
</document>
================================================
FILE: YLSwipeLockViewDemo/Images.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: YLSwipeLockViewDemo/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.xyl.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
================================================
FILE: YLSwipeLockViewDemo/ViewController.h
================================================
//
// ViewController.h
// YLSwipeLockViewDemo
//
// Created by 肖 玉龙 on 15/2/12.
// Copyright (c) 2015年 Yulong Xiao. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
================================================
FILE: YLSwipeLockViewDemo/ViewController.m
================================================
//
// ViewController.m
// YLSwipeLockViewDemo
//
// Created by 肖 玉龙 on 15/2/12.
// Copyright (c) 2015年 Yulong Xiao. All rights reserved.
//
#import "ViewController.h"
#import "YLSwipeLockView.h"
#import "YLInitSwipePasswordController.h"
#import "YLCheckToUnlockViewController.h"
@interface ViewController ()
@property (nonatomic, weak) UIButton *setButton;
@property (nonatomic, weak) UIButton *checkButton;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 100, 30)];
label.text = @"hello world";
CGFloat margin = 20.0f;
CGFloat width = self.view.bounds.size.width - margin * 2;
UIButton *setButton = [[UIButton alloc] initWithFrame:CGRectMake(20, 60, width, 20)];
[setButton setTitle:@"set gesture password" forState:UIControlStateNormal];
[setButton addTarget:self action:@selector(setButtonBeTouched) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:setButton];
UIButton *checkButton = [[UIButton alloc] initWithFrame:CGRectMake(20, 100, width, 20)];
[checkButton setTitle:@"check gesture password" forState:UIControlStateNormal];
[checkButton addTarget:self action:@selector(checkButtonBeTouched) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:checkButton];
}
-(void)setButtonBeTouched
{
YLInitSwipePasswordController *controller = [YLInitSwipePasswordController new];
[self presentViewController:controller animated:YES completion:nil];
}
-(void)checkButtonBeTouched
{
if ([[NSUserDefaults standardUserDefaults] objectForKey:@"gesturePassword"]) {
YLCheckToUnlockViewController *controller = [YLCheckToUnlockViewController new];
[self presentViewController:controller animated:YES completion:nil];
}else {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Attention" message:@"no gesture password set" delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];
[alert show];
}
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
================================================
FILE: YLSwipeLockViewDemo/YLCheckToUnlockViewController.h
================================================
//
// YLCheckToUnlockViewController.h
// YLSwipeLockViewDemo
//
// Created by 肖 玉龙 on 15/2/28.
// Copyright (c) 2015年 Yulong Xiao. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface YLCheckToUnlockViewController : UIViewController
@end
================================================
FILE: YLSwipeLockViewDemo/YLCheckToUnlockViewController.m
================================================
//
// YLCheckToUnlockViewController.m
// YLSwipeLockViewDemo
//
// Created by 肖 玉龙 on 15/2/28.
// Copyright (c) 2015年 Yulong Xiao. All rights reserved.
//
#import "YLCheckToUnlockViewController.h"
#import "YLSwipeLockView.h"
@interface YLCheckToUnlockViewController ()<YLSwipeLockViewDelegate>
@property (nonatomic, weak) YLSwipeLockView *lockView;
@property (nonatomic, weak) UILabel *titleLabel;
@property (nonatomic) NSUInteger unmatchCounter;
@property (nonatomic, weak) UILabel *counterLabel;
@end
@implementation YLCheckToUnlockViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor colorWithRed:35/255.0 green:39/255.0 blue:54/255.0 alpha:1];
UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.text = @"swipe to unlock";
titleLabel.textColor = [UIColor whiteColor];
titleLabel.textAlignment = NSTextAlignmentCenter;
titleLabel.frame = CGRectMake(10, 60, self.view.bounds.size.width - 20, 20);
titleLabel.font = [UIFont boldSystemFontOfSize:16];
[self.view addSubview:titleLabel];
self.titleLabel = titleLabel;
UILabel *counterLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 160, self.view.bounds.size.width - 20, 20)];
counterLabel.textColor = [UIColor redColor];
counterLabel.textAlignment = NSTextAlignmentCenter;
counterLabel.font = [UIFont systemFontOfSize:14];
[self.view addSubview:counterLabel];
self.counterLabel = counterLabel;
self.counterLabel.hidden = YES;
CGFloat viewWidth = self.view.bounds.size.width - 40;
CGFloat viewHeight = viewWidth;
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;
self.unmatchCounter = 5;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
-(YLSwipeLockViewState)swipeView:(YLSwipeLockView *)swipeView didEndSwipeWithPassword:(NSString *)password
{
NSString *savedPassword = [[NSUserDefaults standardUserDefaults] objectForKey:@"gesturePassword"];
if ([savedPassword isEqualToString:password]) {
[self dismiss];
return YLSwipeLockViewStateNormal;
}else{
self.unmatchCounter--;
if (self.unmatchCounter == 0) {
self.counterLabel.text = @"5 times unmatched";
self.counterLabel.hidden = NO;
[self performSelector:@selector(dismiss) withObject:nil afterDelay:1];
}else {
self.counterLabel.text = [NSString stringWithFormat:@"unmatched, %lu times left", (unsigned long)self.unmatchCounter];
self.counterLabel.hidden = NO;
}
return YLSwipeLockViewStateWarning;
}
}
-(void)dismiss{
if (self.presentingViewController) {
[self dismissViewControllerAnimated:YES completion:nil];
}
}
@end
================================================
FILE: YLSwipeLockViewDemo/YLInitSwipePasswordController.h
================================================
//
// YLInitSwipePasswordController.h
// YLSwipeLockViewDemo
//
// Created by 肖 玉龙 on 15/2/27.
// Copyright (c) 2015年 Yulong Xiao. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface YLInitSwipePasswordController : UIViewController
@end
================================================
FILE: YLSwipeLockViewDemo/YLInitSwipePasswordController.m
================================================
//
// YLInitSwipePasswordController.m
// YLSwipeLockViewDemo
//
// Created by 肖 玉龙 on 15/2/27.
// Copyright (c) 2015年 Yulong Xiao. All rights reserved.
//
#import "YLInitSwipePasswordController.h"
#import "YLSwipeLockView.h"
@interface YLInitSwipePasswordController ()<YLSwipeLockViewDelegate>
@property (nonatomic, weak) YLSwipeLockView *lockView;
@property (nonatomic, weak) UILabel *titleLabel;
@property (nonatomic, strong) NSString *passwordString;
@property (nonatomic, weak) UIButton *resetButton;
@end
@implementation YLInitSwipePasswordController
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor colorWithRed:35/255.0 green:39/255.0 blue:54/255.0 alpha:1];
UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.text = @"set your gesture password";
titleLabel.textColor = [UIColor whiteColor];
titleLabel.textAlignment = NSTextAlignmentCenter;
titleLabel.frame = CGRectMake(40, 60, self.view.bounds.size.width - 80, 20);
titleLabel.font = [UIFont boldSystemFontOfSize:16];
[self.view addSubview:titleLabel];
self.titleLabel = titleLabel;
CGFloat viewWidth = self.view.bounds.size.width - 40;
CGFloat viewHeight = viewWidth;
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;
UIButton *resetButton = [[UIButton alloc] initWithFrame:CGRectMake(self.view.bounds.size.width - 60, 60, 40, 20)];
[resetButton setTitle:@"reset" forState:UIControlStateNormal];
[resetButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[resetButton addTarget:self action:@selector(reset) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:resetButton];
self.resetButton = resetButton;
self.resetButton.hidden = YES;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
-(YLSwipeLockViewState)swipeView:(YLSwipeLockView *)swipeView didEndSwipeWithPassword:(NSString *)password
{
if (self.passwordString == nil) {
self.passwordString = password;
self.titleLabel.text = @"confirm your gesture password again";
return YLSwipeLockViewStateNormal;
}else if ([self.passwordString isEqualToString:password]){
self.titleLabel.text = @"set succeed";
self.passwordString = nil;
NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults];
[userDefault setObject:password forKey:@"gesturePassword"];
[self performSelector:@selector(dismiss) withObject:nil afterDelay:1];
return YLSwipeLockViewStateSelected;
}else{
self.titleLabel.text = @"different from last time";
self.resetButton.hidden = NO;
return YLSwipeLockViewStateWarning;
}
}
-(UIStatusBarStyle)preferredStatusBarStyle
{
return UIStatusBarStyleLightContent;
}
-(void)dismiss{
if (self.presentingViewController) {
[self dismissViewControllerAnimated:YES completion:nil];
}
}
-(void)reset
{
self.passwordString = nil;
self.titleLabel.text = @"set your gesture password";
self.resetButton.hidden = YES;
}
@end
================================================
FILE: YLSwipeLockViewDemo/main.m
================================================
//
// main.m
// YLSwipeLockViewDemo
//
// Created by 肖 玉龙 on 15/2/12.
// Copyright (c) 2015年 Yulong Xiao. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
================================================
FILE: YLSwipeLockViewDemo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
3869523D1AA06E1E009CD553 /* YLInitSwipePasswordController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3869523C1AA06E1E009CD553 /* YLInitSwipePasswordController.m */; };
386952401AA1920C009CD553 /* YLCheckToUnlockViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3869523F1AA1920C009CD553 /* YLCheckToUnlockViewController.m */; };
38D246331A8C66C600C0D615 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 38D246321A8C66C600C0D615 /* main.m */; };
38D246361A8C66C600C0D615 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 38D246351A8C66C600C0D615 /* AppDelegate.m */; };
38D246391A8C66C600C0D615 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 38D246381A8C66C600C0D615 /* ViewController.m */; };
38D2463E1A8C66C600C0D615 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 38D2463D1A8C66C600C0D615 /* Images.xcassets */; };
38D246411A8C66C600C0D615 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 38D2463F1A8C66C600C0D615 /* LaunchScreen.xib */; };
38D2464D1A8C66C700C0D615 /* YLSwipeLockViewDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 38D2464C1A8C66C700C0D615 /* YLSwipeLockViewDemoTests.m */; };
38D2465D1A8C6CE900C0D615 /* YLSwipeLockView.m in Sources */ = {isa = PBXBuildFile; fileRef = 38D2465C1A8C6CE900C0D615 /* YLSwipeLockView.m */; };
38D246601A8C72D700C0D615 /* YLSwipeLockNodeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 38D2465F1A8C72D700C0D615 /* YLSwipeLockNodeView.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
38D246471A8C66C600C0D615 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 38D246251A8C66C600C0D615 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 38D2462C1A8C66C600C0D615;
remoteInfo = YLSwipeLockViewDemo;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
3869523B1AA06E1E009CD553 /* YLInitSwipePasswordController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YLInitSwipePasswordController.h; sourceTree = "<group>"; };
3869523C1AA06E1E009CD553 /* YLInitSwipePasswordController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YLInitSwipePasswordController.m; sourceTree = "<group>"; };
3869523E1AA1920C009CD553 /* YLCheckToUnlockViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YLCheckToUnlockViewController.h; sourceTree = "<group>"; };
3869523F1AA1920C009CD553 /* YLCheckToUnlockViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YLCheckToUnlockViewController.m; sourceTree = "<group>"; };
38D2462D1A8C66C600C0D615 /* YLSwipeLockViewDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = YLSwipeLockViewDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
38D246311A8C66C600C0D615 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
38D246321A8C66C600C0D615 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
38D246341A8C66C600C0D615 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
38D246351A8C66C600C0D615 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
38D246371A8C66C600C0D615 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
38D246381A8C66C600C0D615 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
38D2463D1A8C66C600C0D615 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
38D246401A8C66C600C0D615 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
38D246461A8C66C600C0D615 /* YLSwipeLockViewDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = YLSwipeLockViewDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
38D2464B1A8C66C700C0D615 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
38D2464C1A8C66C700C0D615 /* YLSwipeLockViewDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YLSwipeLockViewDemoTests.m; sourceTree = "<group>"; };
38D2465B1A8C6CE900C0D615 /* YLSwipeLockView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YLSwipeLockView.h; path = YLSwipeLockView/YLSwipeLockView.h; sourceTree = "<group>"; };
38D2465C1A8C6CE900C0D615 /* YLSwipeLockView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YLSwipeLockView.m; path = YLSwipeLockView/YLSwipeLockView.m; sourceTree = "<group>"; };
38D2465E1A8C72D700C0D615 /* YLSwipeLockNodeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YLSwipeLockNodeView.h; path = YLSwipeLockView/YLSwipeLockNodeView.h; sourceTree = "<group>"; };
38D2465F1A8C72D700C0D615 /* YLSwipeLockNodeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YLSwipeLockNodeView.m; path = YLSwipeLockView/YLSwipeLockNodeView.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
38D2462A1A8C66C600C0D615 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
38D246431A8C66C600C0D615 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
38D246241A8C66C600C0D615 = {
isa = PBXGroup;
children = (
38D2465A1A8C6C1300C0D615 /* YLSwipeLockView */,
38D2462F1A8C66C600C0D615 /* YLSwipeLockViewDemo */,
38D246491A8C66C600C0D615 /* YLSwipeLockViewDemoTests */,
38D2462E1A8C66C600C0D615 /* Products */,
);
sourceTree = "<group>";
};
38D2462E1A8C66C600C0D615 /* Products */ = {
isa = PBXGroup;
children = (
38D2462D1A8C66C600C0D615 /* YLSwipeLockViewDemo.app */,
38D246461A8C66C600C0D615 /* YLSwipeLockViewDemoTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
38D2462F1A8C66C600C0D615 /* YLSwipeLockViewDemo */ = {
isa = PBXGroup;
children = (
3869523E1AA1920C009CD553 /* YLCheckToUnlockViewController.h */,
3869523F1AA1920C009CD553 /* YLCheckToUnlockViewController.m */,
3869523B1AA06E1E009CD553 /* YLInitSwipePasswordController.h */,
3869523C1AA06E1E009CD553 /* YLInitSwipePasswordController.m */,
38D246341A8C66C600C0D615 /* AppDelegate.h */,
38D246351A8C66C600C0D615 /* AppDelegate.m */,
38D246371A8C66C600C0D615 /* ViewController.h */,
38D246381A8C66C600C0D615 /* ViewController.m */,
38D2463D1A8C66C600C0D615 /* Images.xcassets */,
38D2463F1A8C66C600C0D615 /* LaunchScreen.xib */,
38D246301A8C66C600C0D615 /* Supporting Files */,
);
path = YLSwipeLockViewDemo;
sourceTree = "<group>";
};
38D246301A8C66C600C0D615 /* Supporting Files */ = {
isa = PBXGroup;
children = (
38D246311A8C66C600C0D615 /* Info.plist */,
38D246321A8C66C600C0D615 /* main.m */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
38D246491A8C66C600C0D615 /* YLSwipeLockViewDemoTests */ = {
isa = PBXGroup;
children = (
38D2464C1A8C66C700C0D615 /* YLSwipeLockViewDemoTests.m */,
38D2464A1A8C66C700C0D615 /* Supporting Files */,
);
path = YLSwipeLockViewDemoTests;
sourceTree = "<group>";
};
38D2464A1A8C66C700C0D615 /* Supporting Files */ = {
isa = PBXGroup;
children = (
38D2464B1A8C66C700C0D615 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
38D2465A1A8C6C1300C0D615 /* YLSwipeLockView */ = {
isa = PBXGroup;
children = (
38D2465B1A8C6CE900C0D615 /* YLSwipeLockView.h */,
38D2465C1A8C6CE900C0D615 /* YLSwipeLockView.m */,
38D2465E1A8C72D700C0D615 /* YLSwipeLockNodeView.h */,
38D2465F1A8C72D700C0D615 /* YLSwipeLockNodeView.m */,
);
name = YLSwipeLockView;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
38D2462C1A8C66C600C0D615 /* YLSwipeLockViewDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 38D246501A8C66C700C0D615 /* Build configuration list for PBXNativeTarget "YLSwipeLockViewDemo" */;
buildPhases = (
38D246291A8C66C600C0D615 /* Sources */,
38D2462A1A8C66C600C0D615 /* Frameworks */,
38D2462B1A8C66C600C0D615 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = YLSwipeLockViewDemo;
productName = YLSwipeLockViewDemo;
productReference = 38D2462D1A8C66C600C0D615 /* YLSwipeLockViewDemo.app */;
productType = "com.apple.product-type.application";
};
38D246451A8C66C600C0D615 /* YLSwipeLockViewDemoTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 38D246531A8C66C700C0D615 /* Build configuration list for PBXNativeTarget "YLSwipeLockViewDemoTests" */;
buildPhases = (
38D246421A8C66C600C0D615 /* Sources */,
38D246431A8C66C600C0D615 /* Frameworks */,
38D246441A8C66C600C0D615 /* Resources */,
);
buildRules = (
);
dependencies = (
38D246481A8C66C600C0D615 /* PBXTargetDependency */,
);
name = YLSwipeLockViewDemoTests;
productName = YLSwipeLockViewDemoTests;
productReference = 38D246461A8C66C600C0D615 /* YLSwipeLockViewDemoTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
38D246251A8C66C600C0D615 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0610;
ORGANIZATIONNAME = "Yulong Xiao";
TargetAttributes = {
38D2462C1A8C66C600C0D615 = {
CreatedOnToolsVersion = 6.1;
};
38D246451A8C66C600C0D615 = {
CreatedOnToolsVersion = 6.1;
TestTargetID = 38D2462C1A8C66C600C0D615;
};
};
};
buildConfigurationList = 38D246281A8C66C600C0D615 /* Build configuration list for PBXProject "YLSwipeLockViewDemo" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 38D246241A8C66C600C0D615;
productRefGroup = 38D2462E1A8C66C600C0D615 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
38D2462C1A8C66C600C0D615 /* YLSwipeLockViewDemo */,
38D246451A8C66C600C0D615 /* YLSwipeLockViewDemoTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
38D2462B1A8C66C600C0D615 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
38D246411A8C66C600C0D615 /* LaunchScreen.xib in Resources */,
38D2463E1A8C66C600C0D615 /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
38D246441A8C66C600C0D615 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
38D246291A8C66C600C0D615 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
38D246391A8C66C600C0D615 /* ViewController.m in Sources */,
38D2465D1A8C6CE900C0D615 /* YLSwipeLockView.m in Sources */,
38D246361A8C66C600C0D615 /* AppDelegate.m in Sources */,
3869523D1AA06E1E009CD553 /* YLInitSwipePasswordController.m in Sources */,
38D246331A8C66C600C0D615 /* main.m in Sources */,
386952401AA1920C009CD553 /* YLCheckToUnlockViewController.m in Sources */,
38D246601A8C72D700C0D615 /* YLSwipeLockNodeView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
38D246421A8C66C600C0D615 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
38D2464D1A8C66C700C0D615 /* YLSwipeLockViewDemoTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
38D246481A8C66C600C0D615 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 38D2462C1A8C66C600C0D615 /* YLSwipeLockViewDemo */;
targetProxy = 38D246471A8C66C600C0D615 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
38D2463F1A8C66C600C0D615 /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
children = (
38D246401A8C66C600C0D615 /* Base */,
);
name = LaunchScreen.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
38D2464E1A8C66C700C0D615 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
38D2464F1A8C66C700C0D615 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
38D246511A8C66C700C0D615 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = YLSwipeLockViewDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
38D246521A8C66C700C0D615 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = YLSwipeLockViewDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
38D246541A8C66C700C0D615 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = YLSwipeLockViewDemoTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YLSwipeLockViewDemo.app/YLSwipeLockViewDemo";
};
name = Debug;
};
38D246551A8C66C700C0D615 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = YLSwipeLockViewDemoTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YLSwipeLockViewDemo.app/YLSwipeLockViewDemo";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
38D246281A8C66C600C0D615 /* Build configuration list for PBXProject "YLSwipeLockViewDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
38D2464E1A8C66C700C0D615 /* Debug */,
38D2464F1A8C66C700C0D615 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
38D246501A8C66C700C0D615 /* Build configuration list for PBXNativeTarget "YLSwipeLockViewDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
38D246511A8C66C700C0D615 /* Debug */,
38D246521A8C66C700C0D615 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
38D246531A8C66C700C0D615 /* Build configuration list for PBXNativeTarget "YLSwipeLockViewDemoTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
38D246541A8C66C700C0D615 /* Debug */,
38D246551A8C66C700C0D615 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 38D246251A8C66C600C0D615 /* Project object */;
}
================================================
FILE: YLSwipeLockViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:YLSwipeLockViewDemo.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: YLSwipeLockViewDemoTests/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.xyl.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
================================================
FILE: YLSwipeLockViewDemoTests/YLSwipeLockViewDemoTests.m
================================================
//
// YLSwipeLockViewDemoTests.m
// YLSwipeLockViewDemoTests
//
// Created by 肖 玉龙 on 15/2/12.
// Copyright (c) 2015年 Yulong Xiao. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
@interface YLSwipeLockViewDemoTests : XCTestCase
@end
@implementation YLSwipeLockViewDemoTests
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}
- (void)testExample {
// This is an example of a functional test case.
XCTAssert(YES, @"Pass");
}
- (void)testPerformanceExample {
// This is an example of a performance test case.
[self measureBlock:^{
// Put the code you want to measure the time of here.
}];
}
@end
gitextract_ptsou9z9/
├── .gitignore
├── LICENSE
├── README.md
├── YLSwipeLockView/
│ ├── YLSwipeLockNodeView.h
│ ├── YLSwipeLockNodeView.m
│ ├── YLSwipeLockView.h
│ └── YLSwipeLockView.m
├── YLSwipeLockViewDemo/
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj/
│ │ └── LaunchScreen.xib
│ ├── Images.xcassets/
│ │ └── AppIcon.appiconset/
│ │ └── Contents.json
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── YLCheckToUnlockViewController.h
│ ├── YLCheckToUnlockViewController.m
│ ├── YLInitSwipePasswordController.h
│ ├── YLInitSwipePasswordController.m
│ └── main.m
├── YLSwipeLockViewDemo.xcodeproj/
│ ├── project.pbxproj
│ └── project.xcworkspace/
│ └── contents.xcworkspacedata
└── YLSwipeLockViewDemoTests/
├── Info.plist
└── YLSwipeLockViewDemoTests.m
Condensed preview — 23 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (61K chars).
[
{
"path": ".gitignore",
"chars": 495,
"preview": "# Xcode\n#\nbuild/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!defau..."
},
{
"path": "LICENSE",
"chars": 1079,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2015 Xiao Yulong\n\nPermission is hereby granted, free of charge, to any person obtai..."
},
{
"path": "README.md",
"chars": 1175,
"preview": "# YLSwipeLockView\na swipe password view to unlock an application written in objective-c\n\n<img src=\"example.gif\"/>\n\n## Re..."
},
{
"path": "YLSwipeLockView/YLSwipeLockNodeView.h",
"chars": 458,
"preview": "//\n// YLSwipeLockNodeView.h\n// YLSwipeLockViewDemo\n//\n// Created by 肖 玉龙 on 15/2/12.\n// Copyright (c) 2015年 Yulong X..."
},
{
"path": "YLSwipeLockView/YLSwipeLockNodeView.m",
"chars": 3265,
"preview": "//\n// YLSwipeLockNodeView.m\n// YLSwipeLockViewDemo\n//\n// Created by 肖 玉龙 on 15/2/12.\n// Copyright (c) 2015年 Yulong X..."
},
{
"path": "YLSwipeLockView/YLSwipeLockView.h",
"chars": 709,
"preview": "//\n// YLSwipeLockView.h\n// YLSwipeLockViewDemo\n//\n// Created by 肖 玉龙 on 15/2/12.\n// Copyright (c) 2015年 Yulong Xiao...."
},
{
"path": "YLSwipeLockView/YLSwipeLockView.m",
"chars": 9198,
"preview": "//\n// YLSwipeLockView.m\n// YLSwipeLockViewDemo\n//\n// Created by 肖 玉龙 on 15/2/12.\n// Copyright (c) 2015年 Yulong Xiao...."
},
{
"path": "YLSwipeLockViewDemo/AppDelegate.h",
"chars": 285,
"preview": "//\n// AppDelegate.h\n// YLSwipeLockViewDemo\n//\n// Created by 肖 玉龙 on 15/2/12.\n// Copyright (c) 2015年 Yulong Xiao. All..."
},
{
"path": "YLSwipeLockViewDemo/AppDelegate.m",
"chars": 2397,
"preview": "//\n// AppDelegate.m\n// YLSwipeLockViewDemo\n//\n// Created by 肖 玉龙 on 15/2/12.\n// Copyright (c) 2015年 Yulong Xiao. All..."
},
{
"path": "YLSwipeLockViewDemo/Base.lproj/LaunchScreen.xib",
"chars": 3716,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi..."
},
{
"path": "YLSwipeLockViewDemo/Images.xcassets/AppIcon.appiconset/Contents.json",
"chars": 1077,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"iphone\",\n \"size\" : \"29x29\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\"..."
},
{
"path": "YLSwipeLockViewDemo/Info.plist",
"chars": 1452,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P..."
},
{
"path": "YLSwipeLockViewDemo/ViewController.h",
"chars": 223,
"preview": "//\n// ViewController.h\n// YLSwipeLockViewDemo\n//\n// Created by 肖 玉龙 on 15/2/12.\n// Copyright (c) 2015年 Yulong Xiao...."
},
{
"path": "YLSwipeLockViewDemo/ViewController.m",
"chars": 2227,
"preview": "//\n// ViewController.m\n// YLSwipeLockViewDemo\n//\n// Created by 肖 玉龙 on 15/2/12.\n// Copyright (c) 2015年 Yulong Xiao...."
},
{
"path": "YLSwipeLockViewDemo/YLCheckToUnlockViewController.h",
"chars": 251,
"preview": "//\n// YLCheckToUnlockViewController.h\n// YLSwipeLockViewDemo\n//\n// Created by 肖 玉龙 on 15/2/28.\n// Copyright (c) 2015..."
},
{
"path": "YLSwipeLockViewDemo/YLCheckToUnlockViewController.m",
"chars": 3019,
"preview": "//\n// YLCheckToUnlockViewController.m\n// YLSwipeLockViewDemo\n//\n// Created by 肖 玉龙 on 15/2/28.\n// Copyright (c) 2015..."
},
{
"path": "YLSwipeLockViewDemo/YLInitSwipePasswordController.h",
"chars": 251,
"preview": "//\n// YLInitSwipePasswordController.h\n// YLSwipeLockViewDemo\n//\n// Created by 肖 玉龙 on 15/2/27.\n// Copyright (c) 2015..."
},
{
"path": "YLSwipeLockViewDemo/YLInitSwipePasswordController.m",
"chars": 3341,
"preview": "//\n// YLInitSwipePasswordController.m\n// YLSwipeLockViewDemo\n//\n// Created by 肖 玉龙 on 15/2/27.\n// Copyright (c) 2015..."
},
{
"path": "YLSwipeLockViewDemo/main.m",
"chars": 342,
"preview": "//\n// main.m\n// YLSwipeLockViewDemo\n//\n// Created by 肖 玉龙 on 15/2/12.\n// Copyright (c) 2015年 Yulong Xiao. All rights..."
},
{
"path": "YLSwipeLockViewDemo.xcodeproj/project.pbxproj",
"chars": 19409,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *..."
},
{
"path": "YLSwipeLockViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 164,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:YLSwipeLockView..."
},
{
"path": "YLSwipeLockViewDemoTests/Info.plist",
"chars": 746,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P..."
},
{
"path": "YLSwipeLockViewDemoTests/YLSwipeLockViewDemoTests.m",
"chars": 903,
"preview": "//\n// YLSwipeLockViewDemoTests.m\n// YLSwipeLockViewDemoTests\n//\n// Created by 肖 玉龙 on 15/2/12.\n// Copyright (c) 2015..."
}
]
About this extraction
This page contains the full source code of the XiaoYulong/YLSwipeLockView GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 23 files (54.9 KB), approximately 16.9k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.