Open agrass opened 7 years ago
Hi @jedt, thanks for this module, very cool and useful!
I am using
react-native
0.47.2
react-native-signature-capture
0.4.7
I found the same issues as @agrass, since we have two screens in the app that use the SignatureCapture
component. The problem exists only on iOS, on Android both signature are captured.
My code is like so
<SignatureCapture
ref={element => this.signature = element}
onSaveEvent={result => saveSignature(result.encoded)}
saveImageFileInExtStorage={false}
showNativeButtons={false}
showTitleLabel={false}
viewMode="portrait"
/>
I tried the Objective-C changes contained in #73 where a timestamp is appended to signature
, but in my case UIImage *signImage
is nil
so isSuccess
is false and the onSave
event is never triggered.
I found the solution for my problem and it turned out that it was not related at all to the filename.
I am rendering the two signature screen at same time, since they are part of the same TabStackNavigator, so I need to remove completely the first <SignatureCapture />
in order to make the second work.
I guess the original design of the library was not meant to allow multiple signature and removing each component as you progress in the business flow is a quite easy workaround.
How can we custome file name and pass from react-native app. I tried to change saveImage(String fileName) but It dont work
I found the solution for my problem and it turned out that it was not related at all to the filename.
I am rendering the two signature screen at same time, since they are part of the same TabStackNavigator, so I need to remove completely the first
<SignatureCapture />
in order to make the second work. I guess the original design of the library was not meant to allow multiple signature and removing each component as you progress in the business flow is a quite easy workaround.
How do you "remove completely the first
When I have multiples signatures, all save in the same name "signature.png. I created a PR to fix this #73