• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ipraba/EPSignature: Signature component for iOS in Swift

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

ipraba/EPSignature

开源软件地址:

https://github.com/ipraba/EPSignature

开源编程语言:

Swift 92.9%

开源软件介绍:

EPSignature

EPSignature

Signature component for iOS written in Swift

Platform Swift 4.0 CI Status Version Carthage compatible License Twitter: @HaveYouMetPrabu

Preview

Screenshot Screenshot

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

  1. User can draw the signature either by finger or by apple pencil
  2. Ability to save the signature as default signature which can be retrieved later
  3. Ability to load the saved signature
  4. Works on both orientations(portrait and landscape)
  5. Works on both iPhone and iPad devices
  6. Also can be embedded in any container view
  7. Can extract the signature as Image
  8. 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

@ipraba




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap