Giter Club home page Giter Club logo

ppssignatureview's People

Contributors

brunokoga avatar daij-djan avatar ingmarstein avatar jharwig avatar sridvijay avatar victor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ppssignatureview's Issues

configure cocoaPods

I,m new to iOS development. I didn't use cocoapods before. can you please give me complete work floor about configuring this project with cocoaPods.

Initially I got this issue..

PhaseScriptExecution Check\ Pods\ Manifest.lock /Users/entt/Library/Developer/Xcode/DerivedData/PPSSignatureDemo-aegeuwydbgumskbugijmhqyhohfc/Build/Intermediates/PPSSignatureDemo.build/Debug-iphonesimulator/PPSSignatureDemo.build/Script-51C5B5620D3B4693B8ED7D34.sh
cd /Users/entt/Desktop/editors/PPSSignatureView-master/Example
/bin/sh -c /Users/entt/Library/Developer/Xcode/DerivedData/PPSSignatureDemo-aegeuwydbgumskbugijmhqyhohfc/Build/Intermediates/PPSSignatureDemo.build/Debug-iphonesimulator/PPSSignatureDemo.build/Script-51C5B5620D3B4693B8ED7D34.sh

diff: /../Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

Needs a method to restore a signature

If you want to persist a signature across application launches, you need to save it first, using signatureImage. But you also need to restore a previously saved image back to the PPSSignatureView. Any idea how to do that?

Repopulating Signatures: Some Questions and an Implementation

Hey Jason,

Thanks for a cool library. It works really well!

I've been using this library in an app at work. We decided that we need to re-populate the screen with a previously captured signature in some use cases. (Say the user signs, but isn't ready to save, but they need to look at some other view controller in the middle of their workflow.)

I got it working, but before setting up a pull request, there are a couple of things I wanted to address.

I tried collecting the vertices as they were generated and then passing them back to addVertex() but the call to glMapBufferOES fails and the log spews a bunch of messages: "Attempting to copy gl buffer prematurely." Since that didn't work, I tried something else.

I added my own target to the pan and tap gesture recognizers and recorded the gesture locations and velocities in their respective views. When the signature view comes back on screen, I play back the gestures and the signature draws appropriately.

Is there a better way to redraw the vertices without mocking the gestures? I'm not so familiar with OpenGL ES, so I might have been missing some setup in my initial implementation.

Also, because my signature view is in a scroll view which jumps when the signature finishes (as a result of some of application logic - it's collecting data then refreshing the screen) there's a streak of "ink" towards the top of the signature view.

One last thing - I'd love to contribute this back to the project (if it's wanted) but I need to clear it with my company for legal reasons. I don't know if they consider the gesture recording/playback mechanism to be their IP. In the meantime, more context on the GL question might help someone else even if I can't.

Save as image

I use this in my app and wanted to know if there's a way to save the signature as an image (base64 encoded) to send via API to our payment gateway server. Thanks.

Warnings

Would you merge and create a version if I fix the 5 warnings that appear in xcode?
I did some pr to other projects and they never did so I won't do it if there is no plan in merging it

Thanks!

Signature is not working on iOS7

When I launch this code on an ios7 version for iPhone4, it appears that it does not work.

I am getting a message: "Failed to make complete multisample framebuffer object 8cdd"

Any suggestions?

Example code for signature png image

Hello,

I am wondering if you could provide some example code in order to save the signature as a png.

I know that you have a method to do that in signatureImage but my problem is that I don't know how to get the signature to save, for example linking at the press of a button.

This is probably basic obj-c that I just don't understand. But if I use something like:

- (void)drawImage2
{    
    PPSSignatureView *sig = [[PPSSignatureView alloc]init];
    UIImage *image2 = [sig signatureImage];
    CGRect imageRect = CGRectMake(10, 10, 600, 600);
    [image2 drawInRect:imageRect];
}

I get a blank image 0 x 0 px. I guess i need to know how to target the existing signature in the GLKView.

Any help would be greatly appreciated.

Cheers!

link error at Xcode 6.0.1

the error message is:

Undefined symbols for architecture arm64:
"OBJC_CLASS$_EAGLContext", referenced from:
objc-class-ref in PPSSignatureView.o
"_glDisable", referenced from:
-[PPSSignatureView setupGL] in PPSSignatureView.o
"_glGenVertexArraysOES", referenced from:
-[PPSSignatureView setupGL] in PPSSignatureView.o
"_glGenBuffers", referenced from:
-[PPSSignatureView setupGL] in PPSSignatureView.o
"_glBufferData", referenced from:
-[PPSSignatureView setupGL] in PPSSignatureView.o
"_glVertexAttribPointer", referenced from:
-[PPSSignatureView bindShaderAttributes] in PPSSignatureView.o
"_glDeleteVertexArraysOES", referenced from:
-[PPSSignatureView tearDownGL] in PPSSignatureView.o
"_glMapBufferOES", referenced from:
_addVertex in PPSSignatureView.o
"_glDrawArrays", referenced from:
-[PPSSignatureView drawRect:] in PPSSignatureView.o
"_glBindBuffer", referenced from:
-[PPSSignatureView tap:] in PPSSignatureView.o
-[PPSSignatureView pan:] in PPSSignatureView.o
-[PPSSignatureView setupGL] in PPSSignatureView.o
"_glClearColor", referenced from:
-[PPSSignatureView drawRect:] in PPSSignatureView.o
"_glDeleteBuffers", referenced from:
-[PPSSignatureView tearDownGL] in PPSSignatureView.o
"_glClear", referenced from:
-[PPSSignatureView drawRect:] in PPSSignatureView.o
"_glUnmapBufferOES", referenced from:
_addVertex in PPSSignatureView.o
"_glBindVertexArrayOES", referenced from:
-[PPSSignatureView drawRect:] in PPSSignatureView.o
-[PPSSignatureView setupGL] in PPSSignatureView.o
"_glEnableVertexAttribArray", referenced from:
-[PPSSignatureView bindShaderAttributes] in PPSSignatureView.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any chance to convert to Metal? OpenGL deprecated in iOS 12

Since iOS 12 has deprecated OpenGL / GLKView, it would be great if this project could be converted to Metal. I don't know how much longer OpenGL will still work in iOS. Current version is iOS 13.3 and it still works. But still, one day it will fail.

Method signatureImage causes app to crash

Hi, when I call signatureImage I'm able to get the related UIImage* but after a few moments the app crashes (XCode start showing a lot of SIGABRT and EXC_BAD_INSTRUCTION)
Does it happens to anybody? Does anybody have a solution?

XCode 8.0 iOS 10

Example app crash

Hi @jharwig,
your example app crashes when I touch 'Variable Width' tab with this error message:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[GLKViewController loadView] loaded the "7Iy-2i-DqV-view-KH5-vi-5Sl" nib but didn't get a GLKView.'
Thank you.

library not found for -lPods

ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)

solution:

open Build Settings, then find out the Link Binary With Libraries, then delete the libpods.a.

Carthage support

Is there any plans to include Carthage support for this awesome project?

Thanks.

Crash on line PPSSignatureView.m line 39

Hi,

Crashlytics sporadically reports a crash on line PPSSignatureView.m line 39. I have not personally been able to reproduce this crash myself despite lots of trying. The system it crashes on is ios 8.1.3. I've listed the stack below. Has anyone seen this before?

Thread : Crashed: com.apple.main-thread
0 MyApp 0x00113452 -PPSSignatureView pan:
1 libGFXShared.dylib 0x2be46e1d gfxWaitBufferOnDevices + 48
2 UIKit 0x2ca8f1af _UIGestureRecognizerSendActions + 294
3 UIKit 0x2c93dc9d -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 668
4 UIKit 0x2cd52a91 ___UIGestureRecognizerUpdate_block_invoke661 + 48
5 UIKit 0x2c907515 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 216
6 UIKit 0x2c90548f _UIGestureRecognizerUpdate + 2950
7 UIKit 0x2c93c08d -[UIWindow _sendGesturesForEvent:] + 784
8 UIKit 0x2c93b95d -[UIWindow sendEvent:] + 520
9 UIKit 0x2c9120e5 -[UIApplication sendEvent:] + 196
10 UIKit 0x2cb85ba3 _UIApplicationHandleEventFromQueueEvent + 13874
11 UIKit 0x2c910b27 _UIApplicationHandleEventQueue + 1294
12 CoreFoundation 0x29433fd7 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 14
13 CoreFoundation 0x294333eb __CFRunLoopDoSources0 + 222
14 CoreFoundation 0x29431a69 __CFRunLoopRun + 768
15 CoreFoundation 0x2937eb31 CFRunLoopRunSpecific + 476
16 CoreFoundation 0x2937e943 CFRunLoopRunInMode + 106
17 GraphicsServices 0x30742051 GSEventRunModal + 136
18 UIKit 0x2c970f21 UIApplicationMain + 1440
19 MyApp 0x0007d1b4 main (AppDelegate.swift:19)

Thanks

Cocoapods Support

Hi there

Cocoapods is getting more popular. In my opinion, it would be nice and easier to include this awesome library using cocoapods.

So please include cocoapods support for this.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.