FUIInlineSignatureCollectionViewCell
public class FUIInlineSignatureCollectionViewCell : FUIInlineValidationDrawingCollectionViewCell<FUIInlineSignatureFormView>, FUITableAndCollectionCellUpdate
FUIInlineSignatureCollectionViewCell
is a UICollectionViewCell
subclass that enables the drawing and capturing of a user’s signature.
Usage Example:
let cell = collectionView.dequeueReusableCell(withIdentifier: FUIInlineSignatureCollectionViewCell.reuseIdentifier, for: indexPath) as! FUIInlineSignatureCollectionViewCell
cell.value = self.signatureImage
cell.onChangeHandler = { [unowned self] newValue in
self.signatureImage = newValue
if let image = newValue {
// save the signature image
saveSignatureImage(image: image)
}
}
return cell
Theming
See Theming support in FUIInlineSignatureFormView
.
-
The width of the signature stroke.
The default width is 3.0.
Declaration
Swift
public var signatureStrokeWidth: CGFloat { get set }
-
The color of the signature stroke.
The default color is Fiori color style
primaryLabel
.Declaration
Swift
public var signatureStrokeColor: UIColor { get set }
-
The background color of the signature drawing area.
The default color is Fiori color style
primaryBackground
. This color is also used as the background color of the signature image.Declaration
Swift
public var signatureBackgroundColor: UIColor { get set }
-
The color of the “X” mark.
The default color will be used if this property is
nil
.Declaration
Swift
public var xMarkColor: UIColor? { get set }
-
The color of the signature line.
The default color will be used if this property is
nil
.Declaration
Swift
public var signatureLineColor: UIColor? { get set }
-
The value type is
UIImage?
.Declaration
Swift
public typealias ValueType = UIImage?
-
The value of the property. The default is
nil
.This value is the existing user signature image.
Declaration
Swift
public var value: UIImage? { get set }
-
Implementation of the change handler. This is invoked on changes to the
value
property.Declaration
Swift
public var onChangeHandler: ((UIImage?) -> Void)? { get set }
-
This property sets whether the “X” mark is to be hidden or not.
The default value is
false
, which means the “X” mark will not be hidden.Declaration
Swift
open var hidesXMark: Bool { get set }
-
This property sets whether the signature line is to be hidden or not.
The default value is
false
, which means the signature line will not be hidden.Declaration
Swift
open var hidesSignatureLine: Bool { get set }
-
This property indicates whether a timestamp should be added to the signature image or not.
The default is
false
, where no timestamp is added to the image.Declaration
Swift
open var addsTimestampInImage: Bool { get set }
-
Formats the timestamp.
If this is
nil
, the default format string is “MM/dd/YYYY hh:mma zzz”.Declaration
Swift
open var timestampFormatter: DateFormatter? { get set }
-
The text alignment for the watermark text.
The default is
.natural
.Declaration
Swift
open var watermarkTextAlignment: NSTextAlignment { get set }
-
This property indicates whether the tint color should be applied to display the previously saved signature image.
The default is
true
. The tint color to be applied is thestrokeColor
,Declaration
Swift
open var appliesTintColorToImage: Bool { get set }