Swiftpack.co - globulus/swiftui-digital-signature as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by globulus.
globulus/swiftui-digital-signature 0.1.2
Digital signature component for SwiftUI.
⭐️ 19
🕓 1 year ago
iOS
.package(url: "https://github.com/globulus/swiftui-digital-signature.git", from: "0.1.2")

SwiftUIDigitalSignature

Plug'n' play Digital Signatures in SwiftUI.

Features

  • Freeform signature drawing.
  • Selecting signature image.
  • Typing signature in oblique font.
  • Choose signature color.
  • Choose signature font.
  • Callback produces UIImage that you can save/use.
  • iOS 13/14 compatible.

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

  • 0.1.2 - Added availableTabs initializer param.
  • 0.1.1 - Fixed drawing bounds.
  • 0.1.0 - Initial release.

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

GitHub

link
Stars: 19
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics