https://github.com/simformsolutionspvtltd/sssignaturepad
SSSignaturePad is a lightweight and easy-to-use signature pad for iOS applications. It allows users to draw smooth signatures with their finger or a stylus and provides options to customize the appearance and behavior of the signature pad in SwiftUI
https://github.com/simformsolutionspvtltd/sssignaturepad
signature signature-pad signaturepad signatures swift swiftui swiftui-components swiftui-demo swiftui-example swiftui-learning
Last synced: about 1 month ago
JSON representation
SSSignaturePad is a lightweight and easy-to-use signature pad for iOS applications. It allows users to draw smooth signatures with their finger or a stylus and provides options to customize the appearance and behavior of the signature pad in SwiftUI
- Host: GitHub
- URL: https://github.com/simformsolutionspvtltd/sssignaturepad
- Owner: SimformSolutionsPvtLtd
- License: mit
- Created: 2024-07-17T12:07:30.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-15T06:43:28.000Z (11 months ago)
- Last Synced: 2025-09-02T12:42:28.206Z (about 1 month ago)
- Topics: signature, signature-pad, signaturepad, signatures, swift, swiftui, swiftui-components, swiftui-demo, swiftui-example, swiftui-learning
- Language: Swift
- Homepage:
- Size: 37.1 KB
- Stars: 12
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SSSignaturePad
[](https://cocoapods.org/pods/SSSignaturePad)
[](https://cocoapods.org/pods/SSSignaturePad)
[](https://cocoapods.org/pods/SSSignaturePad)`SSSignaturePad` is a lightweight and easy-to-use signature pad for iOS applications. It allows users to draw smooth signatures with their finger or a stylus and provides options to customize the appearance and behavior of the signature pad in SwiftUI
## Features
- Smooth signature drawing
- Export signature as image
- Clear signature functionality## Requirements
- iOS 15.0+
- Xcode 14.0+
- Swift 5.0+## Installation
### CocoaPods
`SSSignaturePad` is available through [CocoaPods](https://cocoapods.org). To install it, simply add the following line to your `Podfile`:
pod 'SSSignaturePad'
## SwiftUI Usage example
import SwiftUI
import SSSignaturePadstruct ContentView: View {
@State var isSigning: Bool = false
@State var clearSignature: Bool = false
@Binding var signatureImage: UIImage?
@Binding var signaturePDF: Data?var body: some View {
VStack(spacing: 16) {
ZStack(alignment: isSigning ? .bottomTrailing: .center) {
SignatureViewContainer(clearSignature: $clearSignature, signatureImage: $signatureImage, pdfSignature: $signaturePDF)
.disabled(!isSigning)
.frame(height: 197)
.frame(maxWidth: .infinity)
.background(.white)
.overlay(
RoundedRectangle(cornerRadius: 8)
.stroke(Color.red, lineWidth: 3)
)
if isSigning {
Button(action: {
clearSignature = true
}, label: {
HStack {
Text("Clear")
.font(.callout)
.foregroundColor(.black)
}
.padding(.horizontal, 12)
.frame(height: 28)
.background(
Capsule()
.fill(.red)
)
})
.offset(.init(width: -12, height: -12))
} else {
Button(action: {
isSigning = true
}, label: {
VStack(alignment: .center, spacing: 0) {
Image(systemName: "pencil")
.resizable()
.foregroundColor(.black)
.frame(width: 20, height: 20)
.padding(8)
Text("Sign here")
.font(.footnote)
.foregroundColor(.gray)
}
})
}
}
.padding(.top, 16)
.padding(.horizontal, 3)}
.padding()
}
}## How to Contribute 🤝
Whether you're helping us fix bugs, improve the docs, or a feature request, we'd love to have you! :muscle:
Check out our [**Contributing Guide**](CONTRIBUTING.md) for ideas on contributing.## Find this example useful? ❤️
Support it by joining [stargazers](https://github.com/SimformSolutionsPvtLtd/SSSignaturePad/stargazers) :star: for this repository.
## Bugs and Feedback
For bugs, feature feature requests, and discussion use [GitHub Issues](https://github.com/SimformSolutionsPvtLtd/SSSignaturePad/issues).
## Check out our other Libraries
🗂 Simform Solutions Libraries→
## MIT License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
[PR-image]:https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat
[PR-url]:http://makeapullrequest.com
[swift-image]:https://img.shields.io/badge/swift-5.0-orange.svg
[swift-url]: https://swift.org/
[Swift Compatibility-badge]: https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FSimformSolutionsPvtLtd%2FSSSwiftUIGIFView%2Fbadge%3Ftype%3Dswift-versions
[Platform Compatibility-badge]: https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FSimformSolutionsPvtLtd%2FSSSwiftUIGIFView%2Fbadge%3Ftype%3Dplatforms