PSPDFSignatureViewController
@interface PSPDFSignatureViewController
: PSPDFBaseViewController <PSPDFStyleable>
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.
-
Lines (arrays of boxed
PSPDFPoint
s) of thedrawView
.Note
Lines are in view coordinate space. To save them into PDF, first convert them to PDF coordinatesSee
PSPDFConvertViewLinesToPDFLines
for converting the points.Declaration
Objective-C
@property (readonly, nonatomic) NSArray<NSArray<NSValue *> *> *_Nonnull lines;
Swift
var lines: [[NSValue]] { get }
-
Enable natural drawing. Defaults to NO. Usually set via
PSPDFConfiguration.naturalSignatureDrawingEnabled
.Declaration
Objective-C
@property (assign, readwrite, 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 (readwrite, copy, nonatomic) NSArray<UIColor *> *_Nonnull menuColors;
Swift
var menuColors: [UIColor] { get set }
-
Signature controller delegate.
Declaration
Objective-C
@property (readwrite, nonatomic) id<PSPDFSignatureViewControllerDelegate> _Nullable delegate;
Swift
@IBOutlet weak var delegate: PSPDFSignatureViewControllerDelegate? { 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 (assign, readwrite, nonatomic) PSPDFSignatureSavingStrategy savingStrategy;
Swift
var savingStrategy: PSPDFSignatureSavingStrategy { get set }
-
Defines if the certificate picker button should be shown. Defaults to
PSPDFSignatureCertificateSelectionModeIfAvailable
. Usually set viaPSPDFConfiguration.signatureCertificateSelectionMode
.Declaration
Objective-C
@property (assign, readwrite, nonatomic) PSPDFSignatureCertificateSelectionMode certificateSelectionMode;
Swift
var certificateSelectionMode: PSPDFSignatureCertificateSelectionMode { get set }
-
Keeps the drawing area aspect ration regardless of the interface orientation. Setting this to
NO
might produce unexpected results if the view bounds change. Defaults to YES, except if the view is presented inside a form sheet on iPad.Declaration
Objective-C
@property (assign, readwrite, nonatomic) BOOL keepLandscapeAspectRatio;
Swift
var keepLandscapeAspectRatio: Bool { get set }
-
Internally used draw view. Use
lines
as a shortcut to get the drawn signature lines.Declaration
Objective-C
@property (readonly, nonatomic) PSPDFDrawView *_Nonnull drawView;
Swift
var drawView: PSPDFDrawView { 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 (readonly, nonatomic, 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.
Declaration
Objective-C
- (void)cancel:(nullable id)sender;
Swift
func cancel(_ sender: Any?)
-
Called when the done button has been tapped.
Declaration
Objective-C
- (void)done:(nullable id)sender;
Swift
func done(_ sender: Any?)
-
Called when the clear button has been tapped.
Declaration
Objective-C
- (void)clear:(nullable id)sender;
Swift
func clear(_ sender: Any?)
-
Called when a color has been tapped.
Declaration
Objective-C
- (void)color:(nonnull PSPDFColorButton *)sender;
Swift
func color(_ sender: PSPDFColorButton)