globulus / swiftui-digital-signature

Digital signature component for SwiftUI.
MIT License
22 stars 13 forks source link

SwiftUIDigitalSignature

Plug'n' play Digital Signatures in SwiftUI.

Features

Preview

Installation

This component is distributed as a Swift package. Just add the repo URL to your package list:

https://github.com/globulus/swiftui-digital-signature

Sample usage

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!)
        }
      }
    }
  }
}

Changelog

Check out SwiftUIRecipes.com for more SwiftUI solutions, tips and custom components!