PSPDFSignatureViewController
Objective-C
@interface PSPDFSignatureViewController
: PSPDFBaseViewController <PSPDFStyleable, PSPDFOverridable>
Swift
class SignatureViewController : PDFBaseViewController, Styleable, Overridable
The signature view controller can be used to create ink signatures to add to a document.
These signatures optionally can be used to create a digital signature with a certificate.
This class constitutes PSPDFKit’s older signatures functionality from before the introduction of
Electronic Signatures. As such, using this class requires that your license includes the Annotations
feature and was originally purchased in April 2021 or earlier. If you purchased your license after
this time, then you should use SignatureCreationViewController
from Electronic Signatures instead.
This older signatures functionality will continue to be maintained and supported. However, we recommend using Electronic Signatures for new PSPDFKit integrations. If you’re interested in upgrading, please see our migration guide: https://pspdfkit.com/guides/ios/migration-guides/migrating-to-electronic-signatures/
-
Enable natural drawing. Defaults to NO. Usually set via
PSPDFConfiguration.naturalSignatureDrawingEnabled
.Declaration
Objective-C
@property (nonatomic) BOOL naturalDrawingEnabled;
Swift
var naturalDrawingEnabled: Bool { get set }
-
Color options for the color picker (limit this to about 3
UIColor
instances). Defaults to black, blue and red.Declaration
Objective-C
@property (nonatomic, copy) NSArray<UIColor *> *_Nonnull menuColors;
Swift
var menuColors: [UIColor] { get set }
-
Signature controller delegate.
Declaration
Objective-C
@property (nonatomic, weak) id<PSPDFSignatureViewControllerDelegate> _Nullable delegate;
Swift
@IBOutlet weak var delegate: SignatureViewControllerDelegate? { get set }
-
Defines if a signature should be saved. Defaults to
PSPDFSignatureSavingStrategySaveIfSelected
. Usually set viaPSPDFConfiguration.signatureSavingStrategy
. Shows a checkbox, when set toPSPDFSignatureSavingStrategySaveIfSelected
.Declaration
Objective-C
@property (nonatomic) PSPDFSignatureSavingStrategy savingStrategy;
Swift
var savingStrategy: SignatureSavingStrategy { get set }
-
Defines if the certificate picker button should be shown. Defaults to
PSPDFSignatureCertificateSelectionModeIfAvailable
. Usually set viaPSPDFConfiguration.signatureCertificateSelectionMode
.Declaration
Objective-C
@property (nonatomic) PSPDFSignatureCertificateSelectionMode certificateSelectionMode;
Swift
var certificateSelectionMode: SignatureCertificateSelectionMode { get set }
-
The view used internally for drawing the signature.
Use the draw view to access additional drawing data, including biometric values.
Declaration
Objective-C
@property (nonatomic, readonly) PSPDFDrawView *_Nonnull drawView;
Swift
var drawView: DrawView { get }
-
Signer used for digitally signing. If this is set, a digital signature will be created instead of an ink signature.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) PSPDFSigner *signer;
Swift
var signer: PSPDFSigner? { get }
-
Customize the created color menu buttons.
Declaration
Objective-C
- (nonnull PSPDFColorButton *)colorButtonForColor:(nonnull UIColor *)color;
Swift
func colorButton(for color: UIColor) -> PSPDFColorButton
-
Called when the cancel button has been tapped.
-
Called when the done button has been tapped.
-
Called when the clear button has been tapped.
-
Called when a color has been tapped.
Declaration
Objective-C
- (void)color:(nonnull PSPDFColorButton *)sender;
Swift
func color(_ sender: PSPDFColorButton)