项目
在 GitHub 查看
ipraba/EPSignature
关于
使用 Swift 编写的 iOS 签名组件
网站与应用开发可以做什么
- User can draw the signature either by finger or by apple pencil
- Ability to save the signature as default signature which can be retrieved later
- Ability to load the saved signature
- Works on both orientations(portrait and landscape)
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文
EPSignature
Signature component for iOS written in Swift
Preview

Installation
CocoaPods
EPSignature is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "EPSignature"
Carthage
To integrate EPSignature into your Xcode project using Carthage, specify it in your Cartfile:
github "ipraba/EPSignature"
Manual Installation
Just drag and drop the files in Pod/Classes folder into your project
Features
- User can draw the signature either by finger or by apple pencil
- Ability to save the signature as default signature which can be retrieved later
- Ability to load the saved signature
- Works on both orientations(portrait and landscape)
- Works on both iPhone and iPad devices
- Also can be embedded in any container view
- Can extract the signature as Image
- Draws smoothly
Initialization of EPSignatureViewController
let signatureVC = EPSignatureViewController(signatureDelegate: self, showsDate: true, showsSaveSignatureOption: true)
signatureVC.subtitleText = "I agree to the terms and conditions"
signatureVC.title = "John Doe"
let nav = UINavigationController(rootViewController: signatureVC)
presentViewController(nav, animated: true, completion: nil)
Note: You can also embed the signature view in any one of the container using the EPSignatureView
Properties of EPSignatureViewController
| Properties | Description |
|---|---|
showsDate |
Bool value that allows to show the date while signing |
showsSaveSignatureOption |
Bool value that allows the user to save the signature for future use |
signatureDelegate |
Delegate listening for events |
subtitleText |
Subtitle text for signature(Eg: Sign here) |
tintColor |
Tint color for the view controller. Applies for barbuttons, switches and actionsheet |
Properties of EPSignatureView
| Properties | Description |
|---|---|
strokeColor |
Stroke color of the signature |
strokeWidth |
Stroke width of the signature |
isSigned |
Bool value checks whether the user has signed or not |
EPSignatureViewController Delegates
func epSignature(_: EPSignature.EPSignatureViewController, didCancel error: NSError)
func epSignature(_: EPSignature.EPSignatureViewController, didSign signatureImage: UIImage, boundingRect: CGRect)
Note: boundingRect will contain the bounds of the signed image retrieved. Crop using this rect to make shorter and small signature images
License
EPSignature is available under the MIT license. See the LICENSE file for more info.
Author
探索相关项目
加载中…