Signature component for iOS in Swift

Related tags

UI EPSignature
Overview

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

Comments
  • Orientation Issues

    Orientation Issues

    Hello and thanks for this library. To replicate the issue i am facing to the following: -> open app in portrait (device) -> sign & accept & tap done -> tap 'add my signature' again but now do that in landscape. -> Load default signature Now you will see that the image is not showing but if you tap Done it gets saved and it exits the view.

    Also if you sign in portrait and then rotate in landscape the signature gets stretched. If while stretched you try to sign again the signature returns to correct aspect ratio and but gets moved downwards.

    opened by mythodeia 5
  • Swift 4 Support

    Swift 4 Support

    I'm using EPSignature 1.0.3 as a dependency of my private Cocoa Pod. I've got several other dependencies in my pod spec file, all supporting Swift 4. I cannot get my pod spec through lint validation if I include EPSignature as a dependency.

    I'm getting the following errors when running pod spec lint command: - ERROR | [iOS] xcodebuild: EPSignature/Pod/Classes/EPSignatureViewController.swift:42:117: error: argument of '#selector' refers to instance method 'onTouchCancelButton()' that is not exposed to Objective-C - NOTE | [iOS] xcodebuild: EPSignature/Pod/Classes/EPSignatureViewController.swift:103:10: note: add '@objc' to expose this instance method to Objective-C - ERROR | [iOS] xcodebuild: EPSignature/Pod/Classes/EPSignatureViewController.swift:46:113: error: argument of '#selector' refers to instance method 'onTouchDoneButton()' that is not exposed to Objective-C - NOTE | [iOS] xcodebuild: EPSignature/Pod/Classes/EPSignatureViewController.swift:108:10: note: add '@objc' to expose this instance method to Objective-C - ERROR | [iOS] xcodebuild: EPSignature/Pod/Classes/EPSignatureViewController.swift:48:115: error: argument of '#selector' refers to instance method 'onTouchClearButton()' that is not exposed to Objective-C - NOTE | [iOS] xcodebuild: EPSignature/Pod/Classes/EPSignatureViewController.swift:144:10: note: add '@objc' to expose this instance method to Objective-C - ERROR | [iOS] xcodebuild: EPSignature/Pod/Classes/EPSignatureViewController.swift:60:123: error: argument of '#selector' refers to instance method 'onTouchActionButton' that is not exposed to Objective-C

    These errors are related to Swift 3 to Swift 4 conversion. Is there any expected time for EPSignature to support Swift 4?

    Thanks and congrats on your work

    opened by joaogithub 2
  • Needed . [dot] support

    Needed . [dot] support

    @ipraba, nice work! However, sometimes we need a dot with our signatures, currently, I am checking the Example in the Simulator, I can't add a dot. Please close this issue if it's working on the real device.

    Thanks!

    opened by hemangshah 1
  • Getting the signature strokes without the extra whitespace?

    Getting the signature strokes without the extra whitespace?

    Currently there is a method that returns the bounds of the signature without the extra whitespace from the signature view. That is great, but why, then, did you not implement a method that would return the signature without the extra whitespace?

    opened by JinkProject 1
  • Fix README

    Fix README

    Hi,

    I got this error: unrecognized selector sent to instance, this is because onTouchDoneButton calls epSignature with arg name didSign.

    glad if no other developers misread and get that error.

    opened by otiai10 1
  • App crashes after trying to save signature

    App crashes after trying to save signature

    I don't know what happened/ is happening but when I wanted to save my sign app crashed automatically. Other controls such as cancel, delete current signature and trying to save blank image are working.

    Here's some screenshoots down below. Thanks

    Screenshot 2021-10-18 at 23 03 15 Screenshot 2021-10-18 at 23 03 25
    opened by 31d4r 0
  • Add support for Swift 4.2 and Xcode 10.1

    Add support for Swift 4.2 and Xcode 10.1

    • Update project files to adopt new default configurations in Xcode 10.1
    • Update Travis configuration to use Xcode 10.1
    • Update source to support Swift 4.2
    opened by jimmyti 0
  • Support to UI Rotation

    Support to UI Rotation

    ViewController listens to didRotate(from fromInterfaceOrientation: UIInterfaceOrientation) and tells View to reposition View scales and repositions bezierPath to fit on screen maxPoint & maxPoint replaced with bezierPath.bounds as they weren’t updated on rotate.

    opened by fraserscottmorrison 0
  • Update lineWidth of bezierPath on strokeWidth change.

    Update lineWidth of bezierPath on strokeWidth change.

    The current implementation does not allow changing the strokeWidth. The strokeWidth is used only once during initialization to set the lineWidth of the bezierPath, this should also be done when a new strokeWidth is set.

    opened by LcTwisk 0
  • Updated For Swift 3.0

    Updated For Swift 3.0

    Swift 3.0 support with all the syntax and plist configuration, fixed storyboard size class, and choosed iPhone 6 screen, fixed IBActions problem which was causing crash, fixed all warnings and deleted unused code.

    opened by geowarsong 0
  • Fixed draggable modals with iOS 13

    Fixed draggable modals with iOS 13

    iOS 13 modal dialogs can be dismissed by dragging. If you don't prevent this behavior, EPSignature will be unusable. By adding a simple function in the EPSignatureView I was able to fix this.

    opened by gklka 0
  • EPSignatureViewController opening in popup and not working in iOS 13

    EPSignatureViewController opening in popup and not working in iOS 13

    In old versions of iOS EPSignature is working properly but in iOS 13.2 the view controller appears like a popup and you can't draw anything because the finger movement closes the view.

    opened by mmsergi 4
  • Integrate EPSignature into Xcode project using Carthage Error

    Integrate EPSignature into Xcode project using Carthage Error

    I integrated EPSignature into Xcode project using Carthage and I received an error below.

    Skipped building EPSignature due to the error: Dependency "EPSignature" has no shared framework schemes for any of the platforms: iOS

    opened by panncherry 0
  • Add support for Swift 5.0 and Xcode 10.3

    Add support for Swift 5.0 and Xcode 10.3

    • Update project to adopt the recommended build settings in Xcode 10.3
    • Update Travis configuration to use Xcode 10.3
    • Update project to support Swift 5.0
    opened by jimmyti 0
Releases(1.0.6)
Owner
Praba
iOS Developer
Praba
A panel component similar to the iOS Airpod battery panel or the Share Wi-Fi password panel.

A SwiftUI panel component similar to the iOS Airpod battery panel or the Share Wi-Fi password panel.

Red Davis 12 Feb 7, 2022
Customizable CheckBox / RadioButton component for iOS

GDCheckbox An easy to use CheckBox/Radio button component for iOS, with Attributes inspector support. Requirements Xcode 10+ Swift 5 iOS 9+ Installati

Saeid 23 Oct 8, 2022
UI Component. This is a copy swipe-panel from app: Apple Maps, Stocks. Swift version

ContainerController UI Component. This is a copy swipe-panel from app: https://www.apple.com/ios/maps/ Preview Requirements Installation CocoaPods Swi

Rustam 419 Dec 12, 2022
TSnackBarView is a simple and flexible UI component fully written in Swift

TSnackBarView is a simple and flexible UI component fully written in Swift. TSnackBarView helps you to show snackbar easily with 3 styles: normal, successful and error

Nguyen Duc Thinh 3 Aug 22, 2022
TDetailBoxView is a simple and flexible UI component fully written in Swift

TDetailBoxView is a simple and flexible UI component fully written in Swift. TDetailBoxView is developed to help users quickly display the detail screen without having to develop from scratch.

Nguyen Duc Thinh 2 Aug 18, 2022
TSwitchLabel is a simple and flexible UI component fully written in Swift.

TSwitchLabel is a simple and flexible UI component fully written in Swift. TSwitchLabel is developed for you to easily use when you need to design a UI with Label and Switch in the fastest way without having to spend time on develop from scratch.

Nguyen Duc Thinh 2 Aug 18, 2022
AGCircularPicker is helpful component for creating a controller aimed to manage any calculated parameter

We are pleased to offer you our new free lightweight plugin named AGCircularPicker. AGCircularPicker is helpful for creating a controller aimed to man

Agilie Team 617 Dec 19, 2022
An easy to use UI component to help display a signal bar with an added customizable fill animation

TZSignalStrengthView for iOS Introduction TZSignalStrengthView is an easy to use UI component to help display a signal bar with an added customizable

TrianglZ LLC 22 May 14, 2022
Zeplin component preview for your SwiftUI views

A Zeplin component preview for your SwiftUI views. You can use Zeplin components instead of real views within your app until you implement them.

Danis Tazetdinov 4 Sep 1, 2022
⬆️ A SwiftUI view component sliding in from bottom

⬆️ A SwiftUI view component sliding in from bottom

Tieda 595 Dec 28, 2022
A multi-platform SwiftUI component for tabular data

SwiftTabler A multi-platform SwiftUI component for tabular data. NOTE this component is BRAND NEW and under active development. If you need stability,

OpenAlloc 45 Jan 3, 2023
UIStackView replica for iOS 7.x and iOS 8.x

TZStackView A wonderful layout component called the UIStackView was introduced with iOS 9. With this component it is really easy to layout components

Tom van Zummeren 1.2k Oct 10, 2022
Super awesome Swift minion for Core Data (iOS, macOS, tvOS)

⚠️ Since this repository is going to be archived soon, I suggest migrating to NSPersistentContainer instead (available since iOS 10). For other conven

Marko Tadić 306 Sep 23, 2022
A message bar for iOS written in Swift.

Dodo, a message bar for iOS / Swift This is a UI widget for showing text messages in iOS apps. It is useful for showing short messages to the user, so

Evgenii Neumerzhitckii 874 Dec 13, 2022
Protocol oriented, type safe, scalable design system foundation swift framework for iOS.

Doric: Design System Foundation Design System foundation written in Swift. Protocol oriented, type safe, scalable framework for iOS. Features Requirem

Jay 93 Dec 6, 2022
An easy to use FAQ view for iOS written in Swift

FAQView An easy to use FAQ view for iOS written in Swift. This view is a subclass of UIView. Setup with CocoaPods If you are using CocoaPods add this

Mukesh Thawani 467 Dec 5, 2022
A customizable color picker for iOS in Swift

IGColorPicker is a fantastic color picker ?? written in Swift. Table of Contents Documentation Colors Style Other features Installation Example Gettin

iGenius 272 Dec 17, 2022
Material design components for iOS written in Swift

MaterialKit NOTE: This project is unmaintained. Material design components (inspired by Google Material Design) for iOS written in Swift Please feel f

Le Van Nghia 2.5k Jan 5, 2023
Simple and highly customizable iOS tag list view, in Swift.

TagListView Simple and highly customizable iOS tag list view, in Swift. Supports Storyboard, Auto Layout, and @IBDesignable. Usage The most convenient

Ela Workshop 2.5k Jan 5, 2023