SignatureCreationViewController

Swift

@objc(PSPDFSignatureCreationViewController)
open class SignatureCreationViewController : UIViewController, Overridable

A signature creation view controller can be used to add a signature to a document by drawing, selecting an image, or typing.

This class requires the Electronic Signatures feature to be enabled in your license.

To cryptographically sign a document with a certificate, please use the PDFSigner class from PSPDFKit’s Digital Signatures component.

Check out https://pspdfkit.com/guides/ios/signatures/overview/ for more general information about signatures.

PSPDF_EXPORT(PSPDFSignatureCreationViewController)

  • Declaration

    Swift

    public var configuration: SignatureCreationViewController.Configuration { get set }
  • Signature controller delegate.

    Declaration

    Swift

    @objc
    public weak var delegate: SignatureCreationViewControllerDelegate?
  • The view used internally for drawing the signature.

    Use the draw view to access additional drawing data, including biometric values.

    Declaration

    Swift

    @objc
    public var drawView: DrawView { get }
  • Whether the “Save Signature” toggle is enabled, if showSaveToggle is true. If showSaveToggle is false then this property should be ignored.

    Declaration

    Swift

    @objc
    public var isSaveSignatureEnabled: Bool { get }
  • Whether to show the “Save Signature” toggle.

    When presented within PSPDFKit, this value depends on the signatureSavingStrategy and signatureStore availability on the PDFViewController that presented this controller. This is true iff the signatureStore is available and signatureSavingStrategy is set to saveIfSelected.

    When this controller is created manually, this value defaults to false.

    Declaration

    Swift

    @objc
    public var showSaveToggle: Bool { get set }
  • Declaration

    Swift

    public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?)
  • Declaration

    Swift

    public required init?(coder: NSCoder)
  • Creates a signature annotation if a signature is added in either forms — ink drawing, image or text. You should use this API whenever you need to access the signature added by the user once the controller has finished creating the signature. We recommend calling this API in the implementation of signatureCreationViewControllerDidFinish(_:) but you can call this API wherever you see fit.

    Note

    Annotation created will be created with the default class and not the subclass override registered with a Document instance if the SignatureCreationViewController is presented manually instead of interactions with the PSPDFKit UI. This is because the view controller presented is detached from the Document instance whenever it is presented manually

    Declaration

    Swift

    @objc(signatureAnnotationForPageWithSize:)
    public func signatureAnnotation(forPageWith size: CGSize) -> Annotation?

    Parameters

    size

    Size of the page where the signature is intended to be added.

    Return Value

    Ink annotation for drawn signatures otherwise a stamp annotation for image and text type signatures. Returns nil if the signature creation is not done.

  • Declaration

    Swift

    public override func loadView()
  • Declaration

    Swift

    public override func viewDidLoad()
  • Declaration

    Swift

    public override var isModalInPresentation: Bool { get set }
  • Declaration

    Swift

    @objc(configuration)
    public var __configuration: __PSPDFSignatureCreationConfiguration { get set }
  • The possible ways in which the user can input their signature.

    PSPDF_EXPORT(PSPDFSignatureCreationMode)

    See more

    Declaration

    Swift

    @objc(PSPDFSignatureCreationMode)
    public enum Mode : Int
    extension SignatureCreationViewController.Mode: Identifiable
  • Declaration

    Swift

    public struct Configuration : Hashable