alankarmisra / SwiftSignatureView

A lightweight, fast and customizable option for capturing fluid, variable-stroke-width signatures within your app.
MIT License
316 stars 92 forks source link

signature is blank image on iOS14 #52

Open johnqh opened 3 years ago

johnqh commented 3 years ago

This only happens on iOS14. SwiftSignatureView's signature returns an UIImage, but it is blank. LegancySwiftSignatureView works, returns the signature image correctly.

waldo9 commented 3 years ago

Isn't it a dark mode problem?

johnqh commented 3 years ago

no. It is a problem with PencilKitSignatureView. That does not work on iOS14. In my code, I replaced SwiftSignatureView's with LegacySwiftSignatureView and everything worked.

waldo9 commented 3 years ago

For me it works nicely

waldo9 commented 3 years ago

Can you share how you get the image from the library? Also please make sure that dark mode is switched off.

alankarmisra commented 3 years ago

@johnqh I've had blank images in the ios14 simualtor but not on the device. Can you confirm you are having this issue while on the device as well? Thanks!

johnqh commented 3 years ago

Yes on device too. I tested on 14.2 and 14.0 when this bug appeared. Definitely not related to dark mode. When I said “blank”, I didn’t mean UI is blank. I meant the UIImage was a blank image. Still an image, but has nothing on it.

ninjadev106 commented 3 years ago

I have the same issue on iOS 14.0 & 14.2

macshodan commented 3 years ago

Hi, I had the same problem on iOS 14.4, then I checked the example App provided and it worked. So I noticed that in the example App the mimimunStroke, maximumStoke and Stroke alpha property were set, while on my project wasn't. I tried to add the same values in the interface builder fields and can successfully get the signature back. I think it maybe related to the alpha property, probably is 0 by default.

Hope this helps!

ninjadev106 commented 3 years ago

It works. Thanks @macshodan

Dilshad-Noushad commented 1 year ago

@johnqh @alankarmisra I am facing the same issue on iOS16 where the signature disappears once I end the drag action. Please shine some information on this.

nishanega commented 1 year ago

@alankarmisra @johnqh @macshodan I'm also facing the same issue. When you try to sign via in iPhone 14Pro running with iOS 16.0 the signature image is being blank.

wolfej94 commented 1 year ago

Just to add to this, I'm facing the same issue on iOS 16 and it persists on a real device even after I make sure the properties were set like @macshodan recommended.

bivant commented 2 months ago

That is probably caused by the image assign/restore bug in the signature view. https://github.com/alankarmisra/SwiftSignatureView/issues/62