PTDigSigView
@interface PTDigSigView : UIView <PTFontPickerViewControllerDelegate>
The PTDigSigView is used for creating signature path appearances. The view tracks and saves user touches, drawing strokes with the specified color and thickness.
-
The selected signature type.
Declaration
Objective-C
@property (nonatomic) PTSignatureType selectedSignatureType;
Swift
var selectedSignatureType: PTSignatureType { get set }
-
The bounding rectangle exactly containing every drawn point.
Declaration
Objective-C
@property (nonatomic) CGRect boundingRect;
Swift
var boundingRect: CGRect { get set }
-
The stroke points, with differnt strokes separated by
CGPointZero
values.Declaration
Objective-C
@property (nonatomic, strong, nullable) NSMutableArray<NSValue *> *points;
Swift
var points: NSMutableArray? { get set }
-
The stroke color.
Declaration
Objective-C
@property (nonatomic, strong) UIColor *_Nonnull strokeColor;
Swift
var strokeColor: UIColor { get set }
-
The stroke thickness.
Declaration
Objective-C
@property (nonatomic) CGFloat strokeThickness;
Swift
var strokeThickness: CGFloat { get set }
-
The UIButton to choose the image.
Declaration
Objective-C
@property (nonatomic, strong) UIButton *_Nonnull imageButton;
Swift
var imageButton: UIButton { get set }
-
The UIButton to choose the font.
Declaration
Objective-C
@property (nonatomic, strong) UIButton *_Nonnull fontButton;
Swift
var fontButton: UIButton { get set }
-
The UITextField used when typing a signature.
Declaration
Objective-C
@property (nonatomic, strong) UITextField *_Nonnull textField;
Swift
var textField: UITextField { get set }
-
The UIButton to toggle if new signature will be saved for reuse.
Declaration
Objective-C
@property (nonatomic, strong) UIButton *_Nonnull storeSignatureButton;
Swift
var storeSignatureButton: UIButton { get set }
-
The UIButton to clear existing signature.
Declaration
Objective-C
@property (nonatomic, strong) UIButton *_Nonnull clearButton;
Swift
var clearButton: UIButton { get set }
-
The UISegmentedControl that is used to change between signature types.
Declaration
Objective-C
@property (nonatomic, strong) UISegmentedControl *_Nonnull segmentedControl;
Swift
var segmentedControl: UISegmentedControl { get set }
-
Returns a new instance of a PTDigSigView with specified signature types (
PTSignatureType
) and signature colours.Declaration
Objective-C
- (nonnull instancetype) initWithFrame:(CGRect)frame withColours:(nonnull NSArray<UIColor *> *)signatureColors withStrokeThickness:(CGFloat)thickness withTypes:(nonnull NSArray<NSNumber *> *)signatureTypes;
Swift
init(frame: CGRect, withColours signatureColors: [UIColor], withStrokeThickness thickness: CGFloat, withTypes signatureTypes: [NSNumber])
-
Returns a new instance of a PTDigSigView with specified signature types (
PTSignatureType
).Declaration
Objective-C
- (nonnull instancetype)initWithFrame:(CGRect)frame withColour:(nonnull UIColor *)color withStrokeThickness:(CGFloat)thickness withTypes: (nonnull NSArray<NSNumber *> *)signatureTypes;
Swift
convenience init(frame: CGRect, withColour color: UIColor, withStrokeThickness thickness: CGFloat, withTypes signatureTypes: [NSNumber])
-
Returns a new instance of a PTDigSigView.
Declaration
Objective-C
- (nonnull instancetype)initWithFrame:(CGRect)frame withColour:(nonnull UIColor *)color withStrokeThickness:(CGFloat)thickness;
Swift
convenience init(frame: CGRect, withColour color: UIColor, withStrokeThickness thickness: CGFloat)
-
Set the image of the signature.
Declaration
Objective-C
- (void)setImage:(nonnull UIImage *)image;
Swift
func setImage(_ image: UIImage)
-
Clear signatures in all types of the PTDigSigView.
Declaration
Objective-C
- (void)clearSignature;
Swift
func clearSignature()
-
Clear the signature in selected type of the PTDigSigView.
Declaration
Objective-C
- (void)clearSelectedSignature;
Swift
func clearSelectedSignature()