├── Example ├── Podfile ├── PPSSignatureDemo │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── SignatureViewQuartz.h │ ├── SignatureViewQuartzQuadratic.h │ ├── PPSAppDelegate.h │ ├── PPSSignatureDemo-Prefix.pch │ ├── main.m │ ├── PPSAppDelegate.m │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── PPSSignatureDemo-Info.plist │ ├── SignatureViewQuartz.m │ ├── SignatureViewQuartzQuadratic.m │ ├── MainStoryboard_iPad.storyboard │ └── MainStoryboard_iPhone.storyboard ├── PPSSignatureDemoTests │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── PPSSignatureDemoTests-Info.plist │ └── PPSSignatureDemoTests.m ├── signature-letter-j-opengl.png ├── Podfile.lock └── PPSSignatureDemo.xcodeproj │ └── project.pbxproj ├── CHANGELOG.md ├── .gitignore ├── Source ├── PPSSignatureView.h └── PPSSignatureView.m ├── PPSSignatureView.podspec ├── LICENSE ├── README.md └── Rakefile /Example/Podfile: -------------------------------------------------------------------------------- 1 | pod 'PPSSignatureView', :path => '../PPSSignatureView.podspec' 2 | -------------------------------------------------------------------------------- /Example/PPSSignatureDemo/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/PPSSignatureDemoTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/signature-letter-j-opengl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jharwig/PPSSignatureView/HEAD/Example/signature-letter-j-opengl.png -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # PPSSignatureView CHANGELOG 2 | 3 | ## 0.1.1 4 | 5 | Fix iOS8 / XCode 6 errors 6 | 7 | ## 0.1.0 8 | 9 | Initial release. 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | build/* 3 | *.pbxuser 4 | !default.pbxuser 5 | *.mode1v3 6 | !default.mode1v3 7 | *.mode2v3 8 | !default.mode2v3 9 | *.perspectivev3 10 | !default.perspectivev3 11 | *.xcworkspace 12 | !default.xcworkspace 13 | xcuserdata 14 | profile 15 | .DS_Store 16 | *.moved-aside 17 | example/Pods 18 | -------------------------------------------------------------------------------- /Example/PPSSignatureDemo/SignatureViewQuartz.h: -------------------------------------------------------------------------------- 1 | // 2 | // NICSignatureViewQuartz.h 3 | // SignatureDemo 4 | // 5 | // Created by Jason Harwig on 11/6/12. 6 | // Copyright (c) 2012 Near Infinity Corporation. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SignatureViewQuartz : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Source/PPSSignatureView.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface PPSSignatureView : GLKView 5 | 6 | @property (assign, nonatomic) UIColor *strokeColor; 7 | @property (assign, nonatomic) BOOL hasSignature; 8 | @property (strong, nonatomic) UIImage *signatureImage; 9 | 10 | - (void)erase; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Example/PPSSignatureDemo/SignatureViewQuartzQuadratic.h: -------------------------------------------------------------------------------- 1 | // 2 | // NICSignatureViewQuartzQuadratic.h 3 | // SignatureDemo 4 | // 5 | // Created by Jason Harwig on 11/6/12. 6 | // Copyright (c) 2012 Near Infinity Corporation. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SignatureViewQuartzQuadratic : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - PPSSignatureView (0.1.2) 3 | 4 | DEPENDENCIES: 5 | - PPSSignatureView (from `../PPSSignatureView.podspec`) 6 | 7 | EXTERNAL SOURCES: 8 | PPSSignatureView: 9 | :path: ../PPSSignatureView.podspec 10 | 11 | SPEC CHECKSUMS: 12 | PPSSignatureView: 0f9ea27f72f45a9d6a7b9e7a9b7db1c1b91c547c 13 | 14 | COCOAPODS: 0.33.1 15 | -------------------------------------------------------------------------------- /Example/PPSSignatureDemo/PPSAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // PPSAppDelegate.h 3 | // PPSSignatureDemo 4 | // 5 | // Created by Jason Harwig on 12/30/13. 6 | // Copyright (c) 2013 Jason Harwig. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PPSAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/PPSSignatureDemo/PPSSignatureDemo-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_3_0 10 | #warning "This project uses features only available in iOS SDK 3.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/PPSSignatureDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // PPSSignatureDemo 4 | // 5 | // Created by Jason Harwig on 12/30/13. 6 | // Copyright (c) 2013 Jason Harwig. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "PPSAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([PPSAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Example/PPSSignatureDemo/PPSAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // PPSAppDelegate.m 3 | // PPSSignatureDemo 4 | // 5 | // Created by Jason Harwig on 12/30/13. 6 | // Copyright (c) 2013 Jason Harwig. All rights reserved. 7 | // 8 | 9 | #import "PPSAppDelegate.h" 10 | #import 11 | 12 | @implementation PPSAppDelegate 13 | 14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 15 | { 16 | return YES; 17 | } 18 | 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Example/PPSSignatureDemoTests/PPSSignatureDemoTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.pinepointsoftware.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/PPSSignatureDemoTests/PPSSignatureDemoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // PPSSignatureDemoTests.m 3 | // PPSSignatureDemoTests 4 | // 5 | // Created by Jason Harwig on 12/30/13. 6 | // Copyright (c) 2013 Jason Harwig. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PPSSignatureDemoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation PPSSignatureDemoTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /PPSSignatureView.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "PPSSignatureView" 3 | s.version = "0.1.2" 4 | s.summary = "Signature pad" 5 | s.description = <<-DESC 6 | Signature Pad to capture a users signature. 7 | 8 | Techniques are described in blog entry: [Capture a Signature on iOS](https://www.altamiracorp.com/blog/employee-posts/capture-a-signature-on-ios) 9 | DESC 10 | s.homepage = "https://github.com/jharwig/PPSSignatureView" 11 | s.license = 'MIT' 12 | s.author = { "jharwig" => "jason@pinepointsoftware.com" } 13 | s.source = { :git => "https://github.com/jharwig/PPSSignatureView.git", :tag => s.version.to_s } 14 | 15 | s.platform = :ios, '5.0' 16 | s.ios.deployment_target = '5.0' 17 | s.requires_arc = true 18 | 19 | s.source_files = 'Source' 20 | 21 | s.public_header_files = 'Source/*.h' 22 | s.frameworks = 'OpenGLES', 'GLKit' 23 | end 24 | -------------------------------------------------------------------------------- /Example/PPSSignatureDemo/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Pine Point Software LLC 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PPSSignatureView 2 | 3 | Techniques are described in blog entry: [Capture a Signature on iOS](https://www.altamiracorp.com/blog/employee-posts/capture-a-signature-on-ios) 4 | 5 | [![Version](https://cocoapod-badges.herokuapp.com/v/PPSSignatureView/badge.png)](https://cocoadocs.org/docsets/PPSSignatureView) 6 | [![Platform](https://cocoapod-badges.herokuapp.com/p/PPSSignatureView/badge.png)](https://cocoadocs.org/docsets/PPSSignatureView) 7 | 8 | ## Usage 9 | 10 | Connect the `PPSSignatureView` to the `view` property of a `GLKViewController` (or subclass). 11 | 12 | 13 | ## Installation 14 | 15 | PPSSignatureView is available through [CocoaPods](http://cocoapods.org), to install 16 | it simply add the following line to your Podfile: 17 | 18 | pod "PPSSignatureView" 19 | 20 | ## Author 21 | 22 | Jason Harwig ( jason@pinepointsoftware.com ) 23 | [Pine Point Software LLC](http://pinepointsoftware.com) 24 | 25 | ## License 26 | 27 | PPSSignatureView is available under the MIT license. See the LICENSE file for more info. 28 | 29 | ## Screenshot 30 | 31 | ![](https://raw.githubusercontent.com/jharwig/PPSSignatureView/master/Example/signature-letter-j-opengl.png) 32 | -------------------------------------------------------------------------------- /Example/PPSSignatureDemo/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /Example/PPSSignatureDemo/PPSSignatureDemo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.pinepointsoftware.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | MainStoryboard_iPhone 29 | UIMainStoryboardFile~ipad 30 | MainStoryboard_iPad 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationLandscapeLeft 38 | UIInterfaceOrientationLandscapeRight 39 | 40 | UISupportedInterfaceOrientations~ipad 41 | 42 | UIInterfaceOrientationLandscapeLeft 43 | UIInterfaceOrientationLandscapeRight 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Example/PPSSignatureDemo/SignatureViewQuartz.m: -------------------------------------------------------------------------------- 1 | // 2 | // NICSignatureViewQuartz.m 3 | // SignatureDemo 4 | // 5 | // Created by Jason Harwig on 11/6/12. 6 | // Copyright (c) 2012 Near Infinity Corporation. 7 | 8 | #import "SignatureViewQuartz.h" 9 | #import 10 | 11 | @interface SignatureViewQuartz () { 12 | UIBezierPath *path; 13 | } 14 | 15 | @end 16 | 17 | @implementation SignatureViewQuartz 18 | 19 | - (void)commonInit { 20 | path = [UIBezierPath bezierPath]; 21 | 22 | // Capture touches 23 | UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(pan:)]; 24 | pan.maximumNumberOfTouches = pan.minimumNumberOfTouches = 1; 25 | [self addGestureRecognizer:pan]; 26 | 27 | // Erase with long press 28 | [self addGestureRecognizer:[[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(erase)]]; 29 | 30 | } 31 | 32 | - (id)initWithCoder:(NSCoder *)aDecoder 33 | { 34 | if (self = [super initWithCoder:aDecoder]) [self commonInit]; 35 | return self; 36 | } 37 | - (id)initWithFrame:(CGRect)frame 38 | { 39 | if (self = [super initWithFrame:frame]) [self commonInit]; 40 | return self; 41 | } 42 | 43 | - (void)erase { 44 | path = [UIBezierPath bezierPath]; 45 | [self setNeedsDisplay]; 46 | } 47 | 48 | 49 | - (void)pan:(UIPanGestureRecognizer *)pan { 50 | CGPoint currentPoint = [pan locationInView:self]; 51 | 52 | if (pan.state == UIGestureRecognizerStateBegan) { 53 | [path moveToPoint:currentPoint]; 54 | } else if (pan.state == UIGestureRecognizerStateChanged) 55 | [path addLineToPoint:currentPoint]; 56 | 57 | [self setNeedsDisplay]; 58 | } 59 | 60 | - (void)drawRect:(CGRect)rect 61 | { 62 | [[UIColor blackColor] setStroke]; 63 | [path stroke]; 64 | } 65 | 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /Example/PPSSignatureDemo/SignatureViewQuartzQuadratic.m: -------------------------------------------------------------------------------- 1 | // 2 | // NICSignatureViewQuartzQuadratic.m 3 | // SignatureDemo 4 | // 5 | // Created by Jason Harwig on 11/6/12. 6 | // Copyright (c) 2012 Near Infinity Corporation. 7 | 8 | #import "SignatureViewQuartzQuadratic.h" 9 | #import 10 | 11 | static CGPoint midpoint(CGPoint p0, CGPoint p1) { 12 | return (CGPoint) { 13 | (p0.x + p1.x) / 2.0, 14 | (p0.y + p1.y) / 2.0 15 | }; 16 | } 17 | 18 | @interface SignatureViewQuartzQuadratic () { 19 | UIBezierPath *path; 20 | CGPoint previousPoint; 21 | } 22 | @end 23 | 24 | @implementation SignatureViewQuartzQuadratic 25 | 26 | - (void)commonInit { 27 | path = [UIBezierPath bezierPath]; 28 | 29 | // Capture touches 30 | UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(pan:)]; 31 | pan.maximumNumberOfTouches = pan.minimumNumberOfTouches = 1; 32 | [self addGestureRecognizer:pan]; 33 | 34 | // Erase with long press 35 | [self addGestureRecognizer:[[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(erase)]]; 36 | 37 | } 38 | 39 | - (id)initWithCoder:(NSCoder *)aDecoder 40 | { 41 | if (self = [super initWithCoder:aDecoder]) [self commonInit]; 42 | return self; 43 | } 44 | - (id)initWithFrame:(CGRect)frame 45 | { 46 | if (self = [super initWithFrame:frame]) [self commonInit]; 47 | return self; 48 | } 49 | 50 | - (void)erase { 51 | path = [UIBezierPath bezierPath]; 52 | [self setNeedsDisplay]; 53 | } 54 | 55 | 56 | - (void)pan:(UIPanGestureRecognizer *)pan { 57 | CGPoint currentPoint = [pan locationInView:self]; 58 | CGPoint midPoint = midpoint(previousPoint, currentPoint); 59 | 60 | if (pan.state == UIGestureRecognizerStateBegan) { 61 | [path moveToPoint:currentPoint]; 62 | } else if (pan.state == UIGestureRecognizerStateChanged) { 63 | [path addQuadCurveToPoint:midPoint controlPoint:previousPoint]; 64 | } 65 | 66 | previousPoint = currentPoint; 67 | 68 | [self setNeedsDisplay]; 69 | } 70 | 71 | - (void)drawRect:(CGRect)rect 72 | { 73 | [[UIColor blackColor] setStroke]; 74 | [path stroke]; 75 | } 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | desc "Runs the specs [EMPTY]" 2 | task :spec do 3 | # Provide your own implementation 4 | end 5 | 6 | task :version do 7 | git_remotes = `git remote`.strip.split("\n") 8 | 9 | if git_remotes.count > 0 10 | puts "-- fetching version number from github" 11 | sh 'git fetch' 12 | 13 | remote_version = remote_spec_version 14 | end 15 | 16 | if remote_version.nil? 17 | puts "There is no current released version. You're about to release a new Pod." 18 | version = "0.0.1" 19 | else 20 | puts "The current released version of your pod is " + remote_spec_version.to_s() 21 | version = suggested_version_number 22 | end 23 | 24 | puts "Enter the version you want to release (" + version + ") " 25 | new_version_number = $stdin.gets.strip 26 | if new_version_number == "" 27 | new_version_number = version 28 | end 29 | 30 | replace_version_number(new_version_number) 31 | end 32 | 33 | desc "Release a new version of the Pod" 34 | task :release do 35 | 36 | puts "* Running version" 37 | sh "rake version" 38 | 39 | unless ENV['SKIP_CHECKS'] 40 | if `git symbolic-ref HEAD 2>/dev/null`.strip.split('/').last != 'master' 41 | $stderr.puts "[!] You need to be on the `master' branch in order to be able to do a release." 42 | exit 1 43 | end 44 | 45 | if `git tag`.strip.split("\n").include?(spec_version) 46 | $stderr.puts "[!] A tag for version `#{spec_version}' already exists. Change the version in the podspec" 47 | exit 1 48 | end 49 | 50 | puts "You are about to release `#{spec_version}`, is that correct? [y/n]" 51 | exit if $stdin.gets.strip.downcase != 'y' 52 | end 53 | 54 | puts "* Running specs" 55 | sh "rake spec" 56 | 57 | puts "* Linting the podspec" 58 | sh "pod lib lint" 59 | 60 | # Then release 61 | sh "git commit #{podspec_path} CHANGELOG.md -m 'Release #{spec_version}'" 62 | sh "git tag -a #{spec_version} -m 'Release #{spec_version}'" 63 | sh "git push origin master" 64 | sh "git push origin --tags" 65 | sh "pod trunk push #{podspec_path}" 66 | end 67 | 68 | # @return [Pod::Version] The version as reported by the Podspec. 69 | # 70 | def spec_version 71 | require 'cocoapods' 72 | spec = Pod::Specification.from_file(podspec_path) 73 | spec.version 74 | end 75 | 76 | # @return [Pod::Version] The version as reported by the Podspec from remote. 77 | # 78 | def remote_spec_version 79 | require 'cocoapods-core' 80 | 81 | if spec_file_exist_on_remote? 82 | remote_spec = eval(`git show origin/master:#{podspec_path}`) 83 | remote_spec.version 84 | else 85 | nil 86 | end 87 | end 88 | 89 | # @return [Bool] If the remote repository has a copy of the podpesc file or not. 90 | # 91 | def spec_file_exist_on_remote? 92 | test_condition = `if git rev-parse --verify --quiet origin/master:#{podspec_path} >/dev/null; 93 | then 94 | echo 'true' 95 | else 96 | echo 'false' 97 | fi` 98 | 99 | 'true' == test_condition.strip 100 | end 101 | 102 | # @return [String] The relative path of the Podspec. 103 | # 104 | def podspec_path 105 | podspecs = Dir.glob('*.podspec') 106 | if podspecs.count == 1 107 | podspecs.first 108 | else 109 | raise "Could not select a podspec" 110 | end 111 | end 112 | 113 | # @return [String] The suggested version number based on the local and remote version numbers. 114 | # 115 | def suggested_version_number 116 | if spec_version != remote_spec_version 117 | spec_version.to_s() 118 | else 119 | next_version(spec_version).to_s() 120 | end 121 | end 122 | 123 | # @param [Pod::Version] version 124 | # the version for which you need the next version 125 | # 126 | # @note It is computed by bumping the last component of the versino string by 1. 127 | # 128 | # @return [Pod::Version] The version that comes next after the version supplied. 129 | # 130 | def next_version(version) 131 | version_components = version.to_s().split("."); 132 | last = (version_components.last.to_i() + 1).to_s 133 | version_components[-1] = last 134 | Pod::Version.new(version_components.join(".")) 135 | end 136 | 137 | # @param [String] new_version_number 138 | # the new version number 139 | # 140 | # @note This methods replaces the version number in the podspec file with a new version number. 141 | # 142 | # @return void 143 | # 144 | def replace_version_number(new_version_number) 145 | text = File.read(podspec_path) 146 | text.gsub!(/(s.version( )*= ")#{spec_version}(")/, "\\1#{new_version_number}\\3") 147 | File.open(podspec_path, "w") { |file| file.puts text } 148 | end 149 | -------------------------------------------------------------------------------- /Example/PPSSignatureDemo/MainStoryboard_iPad.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /Example/PPSSignatureDemo/MainStoryboard_iPhone.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /Source/PPSSignatureView.m: -------------------------------------------------------------------------------- 1 | #import "PPSSignatureView.h" 2 | #import 3 | 4 | #define STROKE_WIDTH_MIN 0.004 // Stroke width determined by touch velocity 5 | #define STROKE_WIDTH_MAX 0.030 6 | #define STROKE_WIDTH_SMOOTHING 0.5 // Low pass filter alpha 7 | 8 | #define VELOCITY_CLAMP_MIN 20 9 | #define VELOCITY_CLAMP_MAX 5000 10 | 11 | #define QUADRATIC_DISTANCE_TOLERANCE 3.0 // Minimum distance to make a curve 12 | 13 | #define MAXIMUM_VERTECES 100000 14 | 15 | 16 | static GLKVector3 StrokeColor = { 0, 0, 0 }; 17 | static float clearColor[4] = { 1, 1, 1, 0 }; 18 | 19 | // Vertex structure containing 3D point and color 20 | struct PPSSignaturePoint 21 | { 22 | GLKVector3 vertex; 23 | GLKVector3 color; 24 | }; 25 | typedef struct PPSSignaturePoint PPSSignaturePoint; 26 | 27 | 28 | // Maximum verteces in signature 29 | static const int maxLength = MAXIMUM_VERTECES; 30 | 31 | 32 | // Append vertex to array buffer 33 | static inline void addVertex(uint *length, PPSSignaturePoint v) { 34 | if ((*length) >= maxLength) { 35 | return; 36 | } 37 | 38 | GLvoid *data = glMapBufferOES(GL_ARRAY_BUFFER, GL_WRITE_ONLY_OES); 39 | memcpy(data + sizeof(PPSSignaturePoint) * (*length), &v, sizeof(PPSSignaturePoint)); 40 | glUnmapBufferOES(GL_ARRAY_BUFFER); 41 | 42 | (*length)++; 43 | } 44 | 45 | static inline CGPoint QuadraticPointInCurve(CGPoint start, CGPoint end, CGPoint controlPoint, float percent) { 46 | double a = pow((1.0 - percent), 2.0); 47 | double b = 2.0 * percent * (1.0 - percent); 48 | double c = pow(percent, 2.0); 49 | 50 | return (CGPoint) { 51 | a * start.x + b * controlPoint.x + c * end.x, 52 | a * start.y + b * controlPoint.y + c * end.y 53 | }; 54 | } 55 | 56 | static float generateRandom(float from, float to) { return random() % 10000 / 10000.0 * (to - from) + from; } 57 | static float clamp(float min, float max, float value) { return fmaxf(min, fminf(max, value)); } 58 | 59 | 60 | // Find perpendicular vector from two other vectors to compute triangle strip around line 61 | static GLKVector3 perpendicular(PPSSignaturePoint p1, PPSSignaturePoint p2) { 62 | GLKVector3 ret; 63 | ret.x = p2.vertex.y - p1.vertex.y; 64 | ret.y = -1 * (p2.vertex.x - p1.vertex.x); 65 | ret.z = 0; 66 | return ret; 67 | } 68 | 69 | static PPSSignaturePoint ViewPointToGL(CGPoint viewPoint, CGRect bounds, GLKVector3 color) { 70 | 71 | return (PPSSignaturePoint) { 72 | { 73 | (viewPoint.x / bounds.size.width * 2.0 - 1), 74 | ((viewPoint.y / bounds.size.height) * 2.0 - 1) * -1, 75 | 0 76 | }, 77 | color 78 | }; 79 | } 80 | 81 | 82 | @interface PPSSignatureView () { 83 | // OpenGL state 84 | EAGLContext *context; 85 | GLKBaseEffect *effect; 86 | 87 | GLuint vertexArray; 88 | GLuint vertexBuffer; 89 | GLuint dotsArray; 90 | GLuint dotsBuffer; 91 | 92 | 93 | // Array of verteces, with current length 94 | PPSSignaturePoint SignatureVertexData[maxLength]; 95 | uint length; 96 | 97 | PPSSignaturePoint SignatureDotsData[maxLength]; 98 | uint dotsLength; 99 | 100 | 101 | // Width of line at current and previous vertex 102 | float penThickness; 103 | float previousThickness; 104 | 105 | 106 | // Previous points for quadratic bezier computations 107 | CGPoint previousPoint; 108 | CGPoint previousMidPoint; 109 | PPSSignaturePoint previousVertex; 110 | PPSSignaturePoint currentVelocity; 111 | } 112 | 113 | @end 114 | 115 | 116 | @implementation PPSSignatureView 117 | 118 | 119 | - (void)commonInit { 120 | context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; 121 | 122 | if (context) { 123 | time(NULL); 124 | 125 | self.backgroundColor = [UIColor whiteColor]; 126 | self.opaque = NO; 127 | 128 | self.context = context; 129 | self.drawableDepthFormat = GLKViewDrawableDepthFormat24; 130 | self.enableSetNeedsDisplay = YES; 131 | 132 | // Turn on antialiasing 133 | self.drawableMultisample = GLKViewDrawableMultisample4X; 134 | 135 | [self setupGL]; 136 | 137 | // Capture touches 138 | UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(pan:)]; 139 | pan.maximumNumberOfTouches = pan.minimumNumberOfTouches = 1; 140 | pan.cancelsTouchesInView = YES; 141 | [self addGestureRecognizer:pan]; 142 | 143 | // For dotting your i's 144 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap:)]; 145 | tap.cancelsTouchesInView = YES; 146 | [self addGestureRecognizer:tap]; 147 | 148 | // Erase with long press 149 | UILongPressGestureRecognizer *longer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPress:)]; 150 | longer.cancelsTouchesInView = YES; 151 | [self addGestureRecognizer:longer]; 152 | 153 | } else [NSException raise:@"NSOpenGLES2ContextException" format:@"Failed to create OpenGL ES2 context"]; 154 | } 155 | 156 | 157 | - (id)initWithCoder:(NSCoder *)aDecoder 158 | { 159 | if (self = [super initWithCoder:aDecoder]) [self commonInit]; 160 | return self; 161 | } 162 | 163 | 164 | - (id)initWithFrame:(CGRect)frame context:(EAGLContext *)ctx 165 | { 166 | if (self = [super initWithFrame:frame context:ctx]) [self commonInit]; 167 | return self; 168 | } 169 | 170 | 171 | - (void)dealloc 172 | { 173 | [self tearDownGL]; 174 | 175 | if ([EAGLContext currentContext] == context) { 176 | [EAGLContext setCurrentContext:nil]; 177 | } 178 | context = nil; 179 | } 180 | 181 | 182 | - (void)drawRect:(CGRect)rect 183 | { 184 | glClearColor(clearColor[0], clearColor[1], clearColor[2], clearColor[3]); 185 | glClear(GL_COLOR_BUFFER_BIT); 186 | 187 | [effect prepareToDraw]; 188 | 189 | // Drawing of signature lines 190 | if (length > 2) { 191 | glBindVertexArrayOES(vertexArray); 192 | glDrawArrays(GL_TRIANGLE_STRIP, 0, length); 193 | } 194 | 195 | if (dotsLength > 0) { 196 | glBindVertexArrayOES(dotsArray); 197 | glDrawArrays(GL_TRIANGLE_STRIP, 0, dotsLength); 198 | } 199 | } 200 | 201 | 202 | - (void)erase { 203 | length = 0; 204 | dotsLength = 0; 205 | self.hasSignature = NO; 206 | 207 | [self setNeedsDisplay]; 208 | } 209 | 210 | 211 | 212 | - (UIImage *)signatureImage 213 | { 214 | if (!self.hasSignature) 215 | return nil; 216 | 217 | // self.hidden = YES; 218 | // 219 | // self.strokeColor = [UIColor whiteColor]; 220 | // [self setNeedsDisplay]; 221 | UIImage *screenshot = [self snapshot]; 222 | 223 | // self.strokeColor = nil; 224 | // 225 | // self.hidden = NO; 226 | return screenshot; 227 | } 228 | 229 | 230 | #pragma mark - Gesture Recognizers 231 | 232 | 233 | - (void)tap:(UITapGestureRecognizer *)t { 234 | CGPoint l = [t locationInView:self]; 235 | 236 | if (t.state == UIGestureRecognizerStateRecognized) { 237 | glBindBuffer(GL_ARRAY_BUFFER, dotsBuffer); 238 | 239 | PPSSignaturePoint touchPoint = ViewPointToGL(l, self.bounds, (GLKVector3){1, 1, 1}); 240 | addVertex(&dotsLength, touchPoint); 241 | 242 | PPSSignaturePoint centerPoint = touchPoint; 243 | centerPoint.color = StrokeColor; 244 | addVertex(&dotsLength, centerPoint); 245 | 246 | static int segments = 20; 247 | GLKVector2 radius = (GLKVector2){ 248 | clamp(0.00001, 0.02, penThickness * generateRandom(0.5, 1.5)), 249 | clamp(0.00001, 0.02, penThickness * generateRandom(0.5, 1.5)) 250 | }; 251 | GLKVector2 velocityRadius = radius; 252 | float angle = 0; 253 | 254 | for (int i = 0; i <= segments; i++) { 255 | 256 | PPSSignaturePoint p = centerPoint; 257 | p.vertex.x += velocityRadius.x * cosf(angle); 258 | p.vertex.y += velocityRadius.y * sinf(angle); 259 | 260 | addVertex(&dotsLength, p); 261 | addVertex(&dotsLength, centerPoint); 262 | 263 | angle += M_PI * 2.0 / segments; 264 | } 265 | 266 | addVertex(&dotsLength, touchPoint); 267 | 268 | glBindBuffer(GL_ARRAY_BUFFER, 0); 269 | } 270 | 271 | [self setNeedsDisplay]; 272 | } 273 | 274 | 275 | - (void)longPress:(UILongPressGestureRecognizer *)lp { 276 | [self erase]; 277 | } 278 | 279 | - (void)pan:(UIPanGestureRecognizer *)p { 280 | 281 | glBindBuffer(GL_ARRAY_BUFFER, vertexBuffer); 282 | 283 | CGPoint v = [p velocityInView:self]; 284 | CGPoint l = [p locationInView:self]; 285 | 286 | currentVelocity = ViewPointToGL(v, self.bounds, (GLKVector3){0,0,0}); 287 | float distance = 0.; 288 | if (previousPoint.x > 0) { 289 | distance = sqrtf((l.x - previousPoint.x) * (l.x - previousPoint.x) + (l.y - previousPoint.y) * (l.y - previousPoint.y)); 290 | } 291 | 292 | float velocityMagnitude = sqrtf(v.x*v.x + v.y*v.y); 293 | float clampedVelocityMagnitude = clamp(VELOCITY_CLAMP_MIN, VELOCITY_CLAMP_MAX, velocityMagnitude); 294 | float normalizedVelocity = (clampedVelocityMagnitude - VELOCITY_CLAMP_MIN) / (VELOCITY_CLAMP_MAX - VELOCITY_CLAMP_MIN); 295 | 296 | float lowPassFilterAlpha = STROKE_WIDTH_SMOOTHING; 297 | float newThickness = (STROKE_WIDTH_MAX - STROKE_WIDTH_MIN) * (1 - normalizedVelocity) + STROKE_WIDTH_MIN; 298 | penThickness = penThickness * lowPassFilterAlpha + newThickness * (1 - lowPassFilterAlpha); 299 | 300 | if ([p state] == UIGestureRecognizerStateBegan) { 301 | 302 | previousPoint = l; 303 | previousMidPoint = l; 304 | 305 | PPSSignaturePoint startPoint = ViewPointToGL(l, self.bounds, (GLKVector3){1, 1, 1}); 306 | previousVertex = startPoint; 307 | previousThickness = penThickness; 308 | 309 | addVertex(&length, startPoint); 310 | addVertex(&length, previousVertex); 311 | 312 | self.hasSignature = YES; 313 | 314 | } else if ([p state] == UIGestureRecognizerStateChanged) { 315 | 316 | CGPoint mid = CGPointMake((l.x + previousPoint.x) / 2.0, (l.y + previousPoint.y) / 2.0); 317 | 318 | if (distance > QUADRATIC_DISTANCE_TOLERANCE) { 319 | // Plot quadratic bezier instead of line 320 | unsigned int i; 321 | 322 | int segments = (int) distance / 1.5; 323 | 324 | float startPenThickness = previousThickness; 325 | float endPenThickness = penThickness; 326 | previousThickness = penThickness; 327 | 328 | for (i = 0; i < segments; i++) 329 | { 330 | penThickness = startPenThickness + ((endPenThickness - startPenThickness) / segments) * i; 331 | 332 | CGPoint quadPoint = QuadraticPointInCurve(previousMidPoint, mid, previousPoint, (float)i / (float)(segments)); 333 | 334 | PPSSignaturePoint v = ViewPointToGL(quadPoint, self.bounds, StrokeColor); 335 | [self addTriangleStripPointsForPrevious:previousVertex next:v]; 336 | 337 | previousVertex = v; 338 | } 339 | } else if (distance > 1.0) { 340 | 341 | PPSSignaturePoint v = ViewPointToGL(l, self.bounds, StrokeColor); 342 | [self addTriangleStripPointsForPrevious:previousVertex next:v]; 343 | 344 | previousVertex = v; 345 | previousThickness = penThickness; 346 | } 347 | 348 | previousPoint = l; 349 | previousMidPoint = mid; 350 | 351 | } else if (p.state == UIGestureRecognizerStateEnded | p.state == UIGestureRecognizerStateCancelled) { 352 | 353 | PPSSignaturePoint v = ViewPointToGL(l, self.bounds, (GLKVector3){1, 1, 1}); 354 | addVertex(&length, v); 355 | 356 | previousVertex = v; 357 | addVertex(&length, previousVertex); 358 | } 359 | 360 | [self setNeedsDisplay]; 361 | } 362 | 363 | 364 | - (void)setStrokeColor:(UIColor *)strokeColor { 365 | _strokeColor = strokeColor; 366 | [self updateStrokeColor]; 367 | } 368 | 369 | 370 | #pragma mark - Private 371 | 372 | - (void)updateStrokeColor { 373 | CGFloat red, green, blue, alpha, white; 374 | if (effect && self.strokeColor && [self.strokeColor getRed:&red green:&green blue:&blue alpha:&alpha]) { 375 | effect.constantColor = GLKVector4Make(red, green, blue, alpha); 376 | } else if (effect && self.strokeColor && [self.strokeColor getWhite:&white alpha:&alpha]) { 377 | effect.constantColor = GLKVector4Make(white, white, white, alpha); 378 | } else effect.constantColor = GLKVector4Make(0,0,0,1); 379 | } 380 | 381 | 382 | - (void)setBackgroundColor:(UIColor *)backgroundColor { 383 | [super setBackgroundColor:backgroundColor]; 384 | 385 | CGFloat red, green, blue, alpha, white; 386 | if ([backgroundColor getRed:&red green:&green blue:&blue alpha:&alpha]) { 387 | clearColor[0] = red; 388 | clearColor[1] = green; 389 | clearColor[2] = blue; 390 | } else if ([backgroundColor getWhite:&white alpha:&alpha]) { 391 | clearColor[0] = white; 392 | clearColor[1] = white; 393 | clearColor[2] = white; 394 | } 395 | } 396 | 397 | - (void)bindShaderAttributes { 398 | glEnableVertexAttribArray(GLKVertexAttribPosition); 399 | glVertexAttribPointer(GLKVertexAttribPosition, 3, GL_FLOAT, GL_FALSE, sizeof(PPSSignaturePoint), 0); 400 | // glEnableVertexAttribArray(GLKVertexAttribColor); 401 | // glVertexAttribPointer(GLKVertexAttribColor, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), (char *)12); 402 | } 403 | 404 | - (void)setupGL 405 | { 406 | [EAGLContext setCurrentContext:context]; 407 | 408 | effect = [[GLKBaseEffect alloc] init]; 409 | 410 | [self updateStrokeColor]; 411 | 412 | 413 | glDisable(GL_DEPTH_TEST); 414 | 415 | // Signature Lines 416 | glGenVertexArraysOES(1, &vertexArray); 417 | glBindVertexArrayOES(vertexArray); 418 | 419 | glGenBuffers(1, &vertexBuffer); 420 | glBindBuffer(GL_ARRAY_BUFFER, vertexBuffer); 421 | glBufferData(GL_ARRAY_BUFFER, sizeof(SignatureVertexData), SignatureVertexData, GL_DYNAMIC_DRAW); 422 | [self bindShaderAttributes]; 423 | 424 | 425 | // Signature Dots 426 | glGenVertexArraysOES(1, &dotsArray); 427 | glBindVertexArrayOES(dotsArray); 428 | 429 | glGenBuffers(1, &dotsBuffer); 430 | glBindBuffer(GL_ARRAY_BUFFER, dotsBuffer); 431 | glBufferData(GL_ARRAY_BUFFER, sizeof(SignatureDotsData), SignatureDotsData, GL_DYNAMIC_DRAW); 432 | [self bindShaderAttributes]; 433 | 434 | 435 | glBindVertexArrayOES(0); 436 | 437 | 438 | // Perspective 439 | GLKMatrix4 ortho = GLKMatrix4MakeOrtho(-1, 1, -1, 1, 0.1f, 2.0f); 440 | effect.transform.projectionMatrix = ortho; 441 | 442 | GLKMatrix4 modelViewMatrix = GLKMatrix4MakeTranslation(0.0f, 0.0f, -1.0f); 443 | effect.transform.modelviewMatrix = modelViewMatrix; 444 | 445 | length = 0; 446 | penThickness = 0.003; 447 | previousPoint = CGPointMake(-100, -100); 448 | } 449 | 450 | 451 | 452 | - (void)addTriangleStripPointsForPrevious:(PPSSignaturePoint)previous next:(PPSSignaturePoint)next { 453 | float toTravel = penThickness / 2.0; 454 | 455 | for (int i = 0; i < 2; i++) { 456 | GLKVector3 p = perpendicular(previous, next); 457 | GLKVector3 p1 = next.vertex; 458 | GLKVector3 ref = GLKVector3Add(p1, p); 459 | 460 | float distance = GLKVector3Distance(p1, ref); 461 | float difX = p1.x - ref.x; 462 | float difY = p1.y - ref.y; 463 | float ratio = -1.0 * (toTravel / distance); 464 | 465 | difX = difX * ratio; 466 | difY = difY * ratio; 467 | 468 | PPSSignaturePoint stripPoint = { 469 | { p1.x + difX, p1.y + difY, 0.0 }, 470 | StrokeColor 471 | }; 472 | addVertex(&length, stripPoint); 473 | 474 | toTravel *= -1; 475 | } 476 | } 477 | 478 | 479 | - (void)tearDownGL 480 | { 481 | [EAGLContext setCurrentContext:context]; 482 | 483 | glDeleteVertexArraysOES(1, &vertexArray); 484 | glDeleteBuffers(1, &vertexBuffer); 485 | 486 | glDeleteVertexArraysOES(1, &dotsArray); 487 | glDeleteBuffers(1, &dotsBuffer); 488 | 489 | effect = nil; 490 | } 491 | 492 | @end 493 | -------------------------------------------------------------------------------- /Example/PPSSignatureDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 913A051918723FA5007E1418 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 913A051818723FA5007E1418 /* Foundation.framework */; }; 11 | 913A051B18723FA5007E1418 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 913A051A18723FA5007E1418 /* CoreGraphics.framework */; }; 12 | 913A051D18723FA5007E1418 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 913A051C18723FA5007E1418 /* UIKit.framework */; }; 13 | 913A052318723FA5007E1418 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 913A052118723FA5007E1418 /* InfoPlist.strings */; }; 14 | 913A052518723FA5007E1418 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 913A052418723FA5007E1418 /* main.m */; }; 15 | 913A052918723FA5007E1418 /* PPSAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 913A052818723FA5007E1418 /* PPSAppDelegate.m */; }; 16 | 913A052B18723FA5007E1418 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 913A052A18723FA5007E1418 /* Images.xcassets */; }; 17 | 913A053218723FA5007E1418 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 913A053118723FA5007E1418 /* XCTest.framework */; }; 18 | 913A053318723FA5007E1418 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 913A051818723FA5007E1418 /* Foundation.framework */; }; 19 | 913A053418723FA5007E1418 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 913A051C18723FA5007E1418 /* UIKit.framework */; }; 20 | 913A053C18723FA5007E1418 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 913A053A18723FA5007E1418 /* InfoPlist.strings */; }; 21 | 913A053E18723FA5007E1418 /* PPSSignatureDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 913A053D18723FA5007E1418 /* PPSSignatureDemoTests.m */; }; 22 | 913A054918724DAA007E1418 /* MainStoryboard_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 913A054718724DAA007E1418 /* MainStoryboard_iPhone.storyboard */; }; 23 | 913A054A18724DAA007E1418 /* MainStoryboard_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 913A054818724DAA007E1418 /* MainStoryboard_iPad.storyboard */; }; 24 | 913A054F18724DDE007E1418 /* SignatureViewQuartz.m in Sources */ = {isa = PBXBuildFile; fileRef = 913A054C18724DDE007E1418 /* SignatureViewQuartz.m */; }; 25 | 913A055018724DDE007E1418 /* SignatureViewQuartzQuadratic.m in Sources */ = {isa = PBXBuildFile; fileRef = 913A054E18724DDE007E1418 /* SignatureViewQuartzQuadratic.m */; }; 26 | CEF11D56B94B489C8AC08605 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2023A096B642444BAD107BE9 /* libPods.a */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | 913A053518723FA5007E1418 /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 913A050D18723FA5007E1418 /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 913A051418723FA5007E1418; 35 | remoteInfo = PPSSignatureDemo; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 2023A096B642444BAD107BE9 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 913A051518723FA5007E1418 /* PPSSignatureDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PPSSignatureDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 913A051818723FA5007E1418 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 43 | 913A051A18723FA5007E1418 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 44 | 913A051C18723FA5007E1418 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 45 | 913A052018723FA5007E1418 /* PPSSignatureDemo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PPSSignatureDemo-Info.plist"; sourceTree = ""; }; 46 | 913A052218723FA5007E1418 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 47 | 913A052418723FA5007E1418 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 48 | 913A052618723FA5007E1418 /* PPSSignatureDemo-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PPSSignatureDemo-Prefix.pch"; sourceTree = ""; }; 49 | 913A052718723FA5007E1418 /* PPSAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PPSAppDelegate.h; sourceTree = ""; }; 50 | 913A052818723FA5007E1418 /* PPSAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PPSAppDelegate.m; sourceTree = ""; }; 51 | 913A052A18723FA5007E1418 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 52 | 913A053018723FA5007E1418 /* PPSSignatureDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PPSSignatureDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 913A053118723FA5007E1418 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 54 | 913A053918723FA5007E1418 /* PPSSignatureDemoTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PPSSignatureDemoTests-Info.plist"; sourceTree = ""; }; 55 | 913A053B18723FA5007E1418 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 56 | 913A053D18723FA5007E1418 /* PPSSignatureDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PPSSignatureDemoTests.m; sourceTree = ""; }; 57 | 913A054718724DAA007E1418 /* MainStoryboard_iPhone.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MainStoryboard_iPhone.storyboard; sourceTree = ""; }; 58 | 913A054818724DAA007E1418 /* MainStoryboard_iPad.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MainStoryboard_iPad.storyboard; sourceTree = ""; }; 59 | 913A054B18724DDE007E1418 /* SignatureViewQuartz.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SignatureViewQuartz.h; sourceTree = ""; }; 60 | 913A054C18724DDE007E1418 /* SignatureViewQuartz.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SignatureViewQuartz.m; sourceTree = ""; }; 61 | 913A054D18724DDE007E1418 /* SignatureViewQuartzQuadratic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SignatureViewQuartzQuadratic.h; sourceTree = ""; }; 62 | 913A054E18724DDE007E1418 /* SignatureViewQuartzQuadratic.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SignatureViewQuartzQuadratic.m; sourceTree = ""; }; 63 | B03250E3E95B4BE680D7BA91 /* Pods.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.xcconfig; path = Pods/Pods.xcconfig; sourceTree = ""; }; 64 | /* End PBXFileReference section */ 65 | 66 | /* Begin PBXFrameworksBuildPhase section */ 67 | 913A051218723FA5007E1418 /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | 913A051B18723FA5007E1418 /* CoreGraphics.framework in Frameworks */, 72 | 913A051D18723FA5007E1418 /* UIKit.framework in Frameworks */, 73 | 913A051918723FA5007E1418 /* Foundation.framework in Frameworks */, 74 | CEF11D56B94B489C8AC08605 /* libPods.a in Frameworks */, 75 | ); 76 | runOnlyForDeploymentPostprocessing = 0; 77 | }; 78 | 913A052D18723FA5007E1418 /* Frameworks */ = { 79 | isa = PBXFrameworksBuildPhase; 80 | buildActionMask = 2147483647; 81 | files = ( 82 | 913A053218723FA5007E1418 /* XCTest.framework in Frameworks */, 83 | 913A053418723FA5007E1418 /* UIKit.framework in Frameworks */, 84 | 913A053318723FA5007E1418 /* Foundation.framework in Frameworks */, 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | /* End PBXFrameworksBuildPhase section */ 89 | 90 | /* Begin PBXGroup section */ 91 | 913A050C18723FA5007E1418 = { 92 | isa = PBXGroup; 93 | children = ( 94 | 913A051E18723FA5007E1418 /* PPSSignatureDemo */, 95 | 913A053718723FA5007E1418 /* PPSSignatureDemoTests */, 96 | 913A051718723FA5007E1418 /* Frameworks */, 97 | 913A051618723FA5007E1418 /* Products */, 98 | B03250E3E95B4BE680D7BA91 /* Pods.xcconfig */, 99 | ); 100 | sourceTree = ""; 101 | }; 102 | 913A051618723FA5007E1418 /* Products */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 913A051518723FA5007E1418 /* PPSSignatureDemo.app */, 106 | 913A053018723FA5007E1418 /* PPSSignatureDemoTests.xctest */, 107 | ); 108 | name = Products; 109 | sourceTree = ""; 110 | }; 111 | 913A051718723FA5007E1418 /* Frameworks */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | 913A051818723FA5007E1418 /* Foundation.framework */, 115 | 913A051A18723FA5007E1418 /* CoreGraphics.framework */, 116 | 913A051C18723FA5007E1418 /* UIKit.framework */, 117 | 913A053118723FA5007E1418 /* XCTest.framework */, 118 | 2023A096B642444BAD107BE9 /* libPods.a */, 119 | ); 120 | name = Frameworks; 121 | sourceTree = ""; 122 | }; 123 | 913A051E18723FA5007E1418 /* PPSSignatureDemo */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 913A055118724DE7007E1418 /* Alternative Views */, 127 | 913A052718723FA5007E1418 /* PPSAppDelegate.h */, 128 | 913A052818723FA5007E1418 /* PPSAppDelegate.m */, 129 | 913A052A18723FA5007E1418 /* Images.xcassets */, 130 | 913A054718724DAA007E1418 /* MainStoryboard_iPhone.storyboard */, 131 | 913A054818724DAA007E1418 /* MainStoryboard_iPad.storyboard */, 132 | 913A051F18723FA5007E1418 /* Supporting Files */, 133 | ); 134 | path = PPSSignatureDemo; 135 | sourceTree = ""; 136 | }; 137 | 913A051F18723FA5007E1418 /* Supporting Files */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | 913A052018723FA5007E1418 /* PPSSignatureDemo-Info.plist */, 141 | 913A052118723FA5007E1418 /* InfoPlist.strings */, 142 | 913A052418723FA5007E1418 /* main.m */, 143 | 913A052618723FA5007E1418 /* PPSSignatureDemo-Prefix.pch */, 144 | ); 145 | name = "Supporting Files"; 146 | sourceTree = ""; 147 | }; 148 | 913A053718723FA5007E1418 /* PPSSignatureDemoTests */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | 913A053D18723FA5007E1418 /* PPSSignatureDemoTests.m */, 152 | 913A053818723FA5007E1418 /* Supporting Files */, 153 | ); 154 | path = PPSSignatureDemoTests; 155 | sourceTree = ""; 156 | }; 157 | 913A053818723FA5007E1418 /* Supporting Files */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | 913A053918723FA5007E1418 /* PPSSignatureDemoTests-Info.plist */, 161 | 913A053A18723FA5007E1418 /* InfoPlist.strings */, 162 | ); 163 | name = "Supporting Files"; 164 | sourceTree = ""; 165 | }; 166 | 913A055118724DE7007E1418 /* Alternative Views */ = { 167 | isa = PBXGroup; 168 | children = ( 169 | 913A054B18724DDE007E1418 /* SignatureViewQuartz.h */, 170 | 913A054C18724DDE007E1418 /* SignatureViewQuartz.m */, 171 | 913A054D18724DDE007E1418 /* SignatureViewQuartzQuadratic.h */, 172 | 913A054E18724DDE007E1418 /* SignatureViewQuartzQuadratic.m */, 173 | ); 174 | name = "Alternative Views"; 175 | sourceTree = ""; 176 | }; 177 | /* End PBXGroup section */ 178 | 179 | /* Begin PBXNativeTarget section */ 180 | 913A051418723FA5007E1418 /* PPSSignatureDemo */ = { 181 | isa = PBXNativeTarget; 182 | buildConfigurationList = 913A054118723FA5007E1418 /* Build configuration list for PBXNativeTarget "PPSSignatureDemo" */; 183 | buildPhases = ( 184 | 51C5B5620D3B4693B8ED7D34 /* Check Pods Manifest.lock */, 185 | 913A051118723FA5007E1418 /* Sources */, 186 | 913A051218723FA5007E1418 /* Frameworks */, 187 | 913A051318723FA5007E1418 /* Resources */, 188 | 8CCE556E918545FDA19C23EE /* Copy Pods Resources */, 189 | ); 190 | buildRules = ( 191 | ); 192 | dependencies = ( 193 | ); 194 | name = PPSSignatureDemo; 195 | productName = PPSSignatureDemo; 196 | productReference = 913A051518723FA5007E1418 /* PPSSignatureDemo.app */; 197 | productType = "com.apple.product-type.application"; 198 | }; 199 | 913A052F18723FA5007E1418 /* PPSSignatureDemoTests */ = { 200 | isa = PBXNativeTarget; 201 | buildConfigurationList = 913A054418723FA5007E1418 /* Build configuration list for PBXNativeTarget "PPSSignatureDemoTests" */; 202 | buildPhases = ( 203 | 913A052C18723FA5007E1418 /* Sources */, 204 | 913A052D18723FA5007E1418 /* Frameworks */, 205 | 913A052E18723FA5007E1418 /* Resources */, 206 | ); 207 | buildRules = ( 208 | ); 209 | dependencies = ( 210 | 913A053618723FA5007E1418 /* PBXTargetDependency */, 211 | ); 212 | name = PPSSignatureDemoTests; 213 | productName = PPSSignatureDemoTests; 214 | productReference = 913A053018723FA5007E1418 /* PPSSignatureDemoTests.xctest */; 215 | productType = "com.apple.product-type.bundle.unit-test"; 216 | }; 217 | /* End PBXNativeTarget section */ 218 | 219 | /* Begin PBXProject section */ 220 | 913A050D18723FA5007E1418 /* Project object */ = { 221 | isa = PBXProject; 222 | attributes = { 223 | CLASSPREFIX = PPS; 224 | LastUpgradeCheck = 0600; 225 | ORGANIZATIONNAME = "Jason Harwig"; 226 | TargetAttributes = { 227 | 913A052F18723FA5007E1418 = { 228 | TestTargetID = 913A051418723FA5007E1418; 229 | }; 230 | }; 231 | }; 232 | buildConfigurationList = 913A051018723FA5007E1418 /* Build configuration list for PBXProject "PPSSignatureDemo" */; 233 | compatibilityVersion = "Xcode 3.2"; 234 | developmentRegion = English; 235 | hasScannedForEncodings = 0; 236 | knownRegions = ( 237 | en, 238 | ); 239 | mainGroup = 913A050C18723FA5007E1418; 240 | productRefGroup = 913A051618723FA5007E1418 /* Products */; 241 | projectDirPath = ""; 242 | projectRoot = ""; 243 | targets = ( 244 | 913A051418723FA5007E1418 /* PPSSignatureDemo */, 245 | 913A052F18723FA5007E1418 /* PPSSignatureDemoTests */, 246 | ); 247 | }; 248 | /* End PBXProject section */ 249 | 250 | /* Begin PBXResourcesBuildPhase section */ 251 | 913A051318723FA5007E1418 /* Resources */ = { 252 | isa = PBXResourcesBuildPhase; 253 | buildActionMask = 2147483647; 254 | files = ( 255 | 913A054A18724DAA007E1418 /* MainStoryboard_iPad.storyboard in Resources */, 256 | 913A054918724DAA007E1418 /* MainStoryboard_iPhone.storyboard in Resources */, 257 | 913A052318723FA5007E1418 /* InfoPlist.strings in Resources */, 258 | 913A052B18723FA5007E1418 /* Images.xcassets in Resources */, 259 | ); 260 | runOnlyForDeploymentPostprocessing = 0; 261 | }; 262 | 913A052E18723FA5007E1418 /* Resources */ = { 263 | isa = PBXResourcesBuildPhase; 264 | buildActionMask = 2147483647; 265 | files = ( 266 | 913A053C18723FA5007E1418 /* InfoPlist.strings in Resources */, 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | }; 270 | /* End PBXResourcesBuildPhase section */ 271 | 272 | /* Begin PBXShellScriptBuildPhase section */ 273 | 51C5B5620D3B4693B8ED7D34 /* Check Pods Manifest.lock */ = { 274 | isa = PBXShellScriptBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | ); 278 | inputPaths = ( 279 | ); 280 | name = "Check Pods Manifest.lock"; 281 | outputPaths = ( 282 | ); 283 | runOnlyForDeploymentPostprocessing = 0; 284 | shellPath = /bin/sh; 285 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 286 | showEnvVarsInLog = 0; 287 | }; 288 | 8CCE556E918545FDA19C23EE /* Copy Pods Resources */ = { 289 | isa = PBXShellScriptBuildPhase; 290 | buildActionMask = 2147483647; 291 | files = ( 292 | ); 293 | inputPaths = ( 294 | ); 295 | name = "Copy Pods Resources"; 296 | outputPaths = ( 297 | ); 298 | runOnlyForDeploymentPostprocessing = 0; 299 | shellPath = /bin/sh; 300 | shellScript = "\"${SRCROOT}/Pods/Pods-resources.sh\"\n"; 301 | showEnvVarsInLog = 0; 302 | }; 303 | /* End PBXShellScriptBuildPhase section */ 304 | 305 | /* Begin PBXSourcesBuildPhase section */ 306 | 913A051118723FA5007E1418 /* Sources */ = { 307 | isa = PBXSourcesBuildPhase; 308 | buildActionMask = 2147483647; 309 | files = ( 310 | 913A055018724DDE007E1418 /* SignatureViewQuartzQuadratic.m in Sources */, 311 | 913A052918723FA5007E1418 /* PPSAppDelegate.m in Sources */, 312 | 913A054F18724DDE007E1418 /* SignatureViewQuartz.m in Sources */, 313 | 913A052518723FA5007E1418 /* main.m in Sources */, 314 | ); 315 | runOnlyForDeploymentPostprocessing = 0; 316 | }; 317 | 913A052C18723FA5007E1418 /* Sources */ = { 318 | isa = PBXSourcesBuildPhase; 319 | buildActionMask = 2147483647; 320 | files = ( 321 | 913A053E18723FA5007E1418 /* PPSSignatureDemoTests.m in Sources */, 322 | ); 323 | runOnlyForDeploymentPostprocessing = 0; 324 | }; 325 | /* End PBXSourcesBuildPhase section */ 326 | 327 | /* Begin PBXTargetDependency section */ 328 | 913A053618723FA5007E1418 /* PBXTargetDependency */ = { 329 | isa = PBXTargetDependency; 330 | target = 913A051418723FA5007E1418 /* PPSSignatureDemo */; 331 | targetProxy = 913A053518723FA5007E1418 /* PBXContainerItemProxy */; 332 | }; 333 | /* End PBXTargetDependency section */ 334 | 335 | /* Begin PBXVariantGroup section */ 336 | 913A052118723FA5007E1418 /* InfoPlist.strings */ = { 337 | isa = PBXVariantGroup; 338 | children = ( 339 | 913A052218723FA5007E1418 /* en */, 340 | ); 341 | name = InfoPlist.strings; 342 | sourceTree = ""; 343 | }; 344 | 913A053A18723FA5007E1418 /* InfoPlist.strings */ = { 345 | isa = PBXVariantGroup; 346 | children = ( 347 | 913A053B18723FA5007E1418 /* en */, 348 | ); 349 | name = InfoPlist.strings; 350 | sourceTree = ""; 351 | }; 352 | /* End PBXVariantGroup section */ 353 | 354 | /* Begin XCBuildConfiguration section */ 355 | 913A053F18723FA5007E1418 /* Debug */ = { 356 | isa = XCBuildConfiguration; 357 | buildSettings = { 358 | ALWAYS_SEARCH_USER_PATHS = NO; 359 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 360 | CLANG_CXX_LIBRARY = "libc++"; 361 | CLANG_ENABLE_MODULES = YES; 362 | CLANG_ENABLE_OBJC_ARC = YES; 363 | CLANG_WARN_BOOL_CONVERSION = YES; 364 | CLANG_WARN_CONSTANT_CONVERSION = YES; 365 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 366 | CLANG_WARN_EMPTY_BODY = YES; 367 | CLANG_WARN_ENUM_CONVERSION = YES; 368 | CLANG_WARN_INT_CONVERSION = YES; 369 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 370 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 371 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 372 | COPY_PHASE_STRIP = NO; 373 | GCC_C_LANGUAGE_STANDARD = gnu99; 374 | GCC_DYNAMIC_NO_PIC = NO; 375 | GCC_OPTIMIZATION_LEVEL = 0; 376 | GCC_PREPROCESSOR_DEFINITIONS = ( 377 | "DEBUG=1", 378 | "$(inherited)", 379 | ); 380 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 381 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 382 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 383 | GCC_WARN_UNDECLARED_SELECTOR = YES; 384 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 385 | GCC_WARN_UNUSED_FUNCTION = YES; 386 | GCC_WARN_UNUSED_VARIABLE = YES; 387 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 388 | ONLY_ACTIVE_ARCH = YES; 389 | SDKROOT = iphoneos; 390 | TARGETED_DEVICE_FAMILY = "1,2"; 391 | }; 392 | name = Debug; 393 | }; 394 | 913A054018723FA5007E1418 /* Release */ = { 395 | isa = XCBuildConfiguration; 396 | buildSettings = { 397 | ALWAYS_SEARCH_USER_PATHS = NO; 398 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 399 | CLANG_CXX_LIBRARY = "libc++"; 400 | CLANG_ENABLE_MODULES = YES; 401 | CLANG_ENABLE_OBJC_ARC = YES; 402 | CLANG_WARN_BOOL_CONVERSION = YES; 403 | CLANG_WARN_CONSTANT_CONVERSION = YES; 404 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 405 | CLANG_WARN_EMPTY_BODY = YES; 406 | CLANG_WARN_ENUM_CONVERSION = YES; 407 | CLANG_WARN_INT_CONVERSION = YES; 408 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 409 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 410 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 411 | COPY_PHASE_STRIP = YES; 412 | ENABLE_NS_ASSERTIONS = NO; 413 | GCC_C_LANGUAGE_STANDARD = gnu99; 414 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 415 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 416 | GCC_WARN_UNDECLARED_SELECTOR = YES; 417 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 418 | GCC_WARN_UNUSED_FUNCTION = YES; 419 | GCC_WARN_UNUSED_VARIABLE = YES; 420 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 421 | SDKROOT = iphoneos; 422 | TARGETED_DEVICE_FAMILY = "1,2"; 423 | VALIDATE_PRODUCT = YES; 424 | }; 425 | name = Release; 426 | }; 427 | 913A054218723FA5007E1418 /* Debug */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = B03250E3E95B4BE680D7BA91 /* Pods.xcconfig */; 430 | buildSettings = { 431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 432 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 433 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 434 | GCC_PREFIX_HEADER = "PPSSignatureDemo/PPSSignatureDemo-Prefix.pch"; 435 | INFOPLIST_FILE = "PPSSignatureDemo/PPSSignatureDemo-Info.plist"; 436 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 437 | PRODUCT_NAME = "$(TARGET_NAME)"; 438 | WRAPPER_EXTENSION = app; 439 | }; 440 | name = Debug; 441 | }; 442 | 913A054318723FA5007E1418 /* Release */ = { 443 | isa = XCBuildConfiguration; 444 | baseConfigurationReference = B03250E3E95B4BE680D7BA91 /* Pods.xcconfig */; 445 | buildSettings = { 446 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 447 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 448 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 449 | GCC_PREFIX_HEADER = "PPSSignatureDemo/PPSSignatureDemo-Prefix.pch"; 450 | INFOPLIST_FILE = "PPSSignatureDemo/PPSSignatureDemo-Info.plist"; 451 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 452 | PRODUCT_NAME = "$(TARGET_NAME)"; 453 | WRAPPER_EXTENSION = app; 454 | }; 455 | name = Release; 456 | }; 457 | 913A054518723FA5007E1418 /* Debug */ = { 458 | isa = XCBuildConfiguration; 459 | buildSettings = { 460 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/PPSSignatureDemo.app/PPSSignatureDemo"; 461 | FRAMEWORK_SEARCH_PATHS = ( 462 | "$(SDKROOT)/Developer/Library/Frameworks", 463 | "$(inherited)", 464 | "$(DEVELOPER_FRAMEWORKS_DIR)", 465 | ); 466 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 467 | GCC_PREFIX_HEADER = "PPSSignatureDemo/PPSSignatureDemo-Prefix.pch"; 468 | GCC_PREPROCESSOR_DEFINITIONS = ( 469 | "DEBUG=1", 470 | "$(inherited)", 471 | ); 472 | INFOPLIST_FILE = "PPSSignatureDemoTests/PPSSignatureDemoTests-Info.plist"; 473 | PRODUCT_NAME = "$(TARGET_NAME)"; 474 | TEST_HOST = "$(BUNDLE_LOADER)"; 475 | WRAPPER_EXTENSION = xctest; 476 | }; 477 | name = Debug; 478 | }; 479 | 913A054618723FA5007E1418 /* Release */ = { 480 | isa = XCBuildConfiguration; 481 | buildSettings = { 482 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/PPSSignatureDemo.app/PPSSignatureDemo"; 483 | FRAMEWORK_SEARCH_PATHS = ( 484 | "$(SDKROOT)/Developer/Library/Frameworks", 485 | "$(inherited)", 486 | "$(DEVELOPER_FRAMEWORKS_DIR)", 487 | ); 488 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 489 | GCC_PREFIX_HEADER = "PPSSignatureDemo/PPSSignatureDemo-Prefix.pch"; 490 | INFOPLIST_FILE = "PPSSignatureDemoTests/PPSSignatureDemoTests-Info.plist"; 491 | PRODUCT_NAME = "$(TARGET_NAME)"; 492 | TEST_HOST = "$(BUNDLE_LOADER)"; 493 | WRAPPER_EXTENSION = xctest; 494 | }; 495 | name = Release; 496 | }; 497 | /* End XCBuildConfiguration section */ 498 | 499 | /* Begin XCConfigurationList section */ 500 | 913A051018723FA5007E1418 /* Build configuration list for PBXProject "PPSSignatureDemo" */ = { 501 | isa = XCConfigurationList; 502 | buildConfigurations = ( 503 | 913A053F18723FA5007E1418 /* Debug */, 504 | 913A054018723FA5007E1418 /* Release */, 505 | ); 506 | defaultConfigurationIsVisible = 0; 507 | defaultConfigurationName = Release; 508 | }; 509 | 913A054118723FA5007E1418 /* Build configuration list for PBXNativeTarget "PPSSignatureDemo" */ = { 510 | isa = XCConfigurationList; 511 | buildConfigurations = ( 512 | 913A054218723FA5007E1418 /* Debug */, 513 | 913A054318723FA5007E1418 /* Release */, 514 | ); 515 | defaultConfigurationIsVisible = 0; 516 | defaultConfigurationName = Release; 517 | }; 518 | 913A054418723FA5007E1418 /* Build configuration list for PBXNativeTarget "PPSSignatureDemoTests" */ = { 519 | isa = XCConfigurationList; 520 | buildConfigurations = ( 521 | 913A054518723FA5007E1418 /* Debug */, 522 | 913A054618723FA5007E1418 /* Release */, 523 | ); 524 | defaultConfigurationIsVisible = 0; 525 | defaultConfigurationName = Release; 526 | }; 527 | /* End XCConfigurationList section */ 528 | }; 529 | rootObject = 913A050D18723FA5007E1418 /* Project object */; 530 | } 531 | --------------------------------------------------------------------------------