Plug'n' play Digital Signatures in SwiftUI.
UIImage
that you can save/use.This component is distributed as a Swift package. Just add the repo URL to your package list:
https://github.com/globulus/swiftui-digital-signature
struct SignatureViewTest: View {
@State private var image: UIImage? = nil
var body: some View {
NavigationView {
VStack {
NavigationLink("GO", destination: SignatureView(availableTabs: [.draw, .image, .type],
onSave: { image in
self.image = image
}, onCancel: {
}))
if image != nil {
Image(uiImage: image!)
}
}
}
}
}
availableTabs
initializer param.Check out SwiftUIRecipes.com for more SwiftUI solutions, tips and custom components!