SignatureCaptureView

public struct SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView> where StartActionView : View, RestartActionView : View, CancelActionView : View, ClearActionView : View, SaveActionView : View
extension SignatureCaptureView: View

Undocumented

  • Undocumented

    Declaration

    Swift

    public private(set) var _heightDidChangePublisher: CurrentValueSubject<CGFloat, Never> { get }
  • Undocumented

    Declaration

    Swift

    public init(
          title: String? = nil,
    @ViewBuilder startAction: () -> StartActionView,
    @ViewBuilder restartAction: () -> RestartActionView,
    @ViewBuilder cancelAction: () -> CancelActionView,
    @ViewBuilder clearAction: () -> ClearActionView,
    @ViewBuilder saveAction: () -> SaveActionView,
    signatureImage: UIImage? = nil,
    onSave: ((UIImage) -> Void)? = nil,
    onDelete: (() -> Void)? = nil
          )
  • Declaration

    Swift

    public var body: some View { get }
  • A view modifier to set the title font.

    The default is Font.body.

    Declaration

    Swift

    func titleFont(_ font: Font?) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

    Parameters

    width

    The desired stroke width.

  • A view modifier to set the title text color.

    The default is Color.preferredColor(.primaryLabel).

    Declaration

    Swift

    func titleColor(_ color: Color?) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

    Parameters

    width

    The desired stroke width.

  • A view modifier to set the stroke width.

    The default stroke width is 3 px.

    Declaration

    Swift

    func strokeWidth(_ width: CGFloat) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

    Parameters

    width

    The desired stroke width.

  • A view modifier to set the stroke color.

    The default stroke color is Fiori color style “.primaryLabel”.

    Declaration

    Swift

    func strokeColor(_ color: Color) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

    Parameters

    width

    The desired stroke color.

  • A view modifier to set the drawing area background color.

    The default background color is Fiori color style “.primaryBackground”.

    Declaration

    Swift

    func drawingViewBackgroundColor(_ color: Color) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

    Parameters

    width

    The desired stroke color.

  • A view modifier to set the maximum height of the drawing area.

    Declaration

    Swift

    func _drawingViewMaxHeight(_ height: CGFloat?) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

    Parameters

    height

    The maximum height of the drawing area. Set it to nil indicates to use the max height of the device screen.

  • A view modifier to set if the saved image should crop the extra spaces or not. The default is not to crop.

    Declaration

    Swift

    func cropsImage(_ cropsImage: Bool) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

    Parameters

    cropsImage

    Indicates if the saved image should crop the extra spaces or not.

  • A view modifier to set the color of the “X” mark.

    Declaration

    Swift

    func xmarkColor(_ color: Color?) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

    Parameters

    color

    The desired color of the “X” mark.

  • A view modifier to set the color of the signature line.

    Declaration

    Swift

    func signatureLineColor(_ color: Color?) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

    Parameters

    color

    The desired color for the signature line.

  • A view modify to indicate to hide XMark or not.

    Declaration

    Swift

    func hidesXmark(_ hidesXmark: Bool) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

    Parameters

    hidesXmark

    Set this to true to hide the X Mark.

  • A view modify to indicate to hide XMark or not.

    Declaration

    Swift

    func hidesSignatureLine(_ hidesSignatureLine: Bool) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

    Parameters

    hidesSignatureLine

    Set this to true to hide the signature line.

  • A view modifier to indicate to add timestamp to the signature image or not.

    Declaration

    Swift

    func addsTimestampInImage(_ addsTimestampInImage: Bool) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

    Parameters

    addsTimestampInImage

    Set this to true to add timestamp to the signature image.

  • A view modifier to provide a customized timestamp formatter.

    Declaration

    Swift

    func timestampFormatter(_ timestampFormatter: DateFormatter?) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

    Parameters

    timestampFormatter

    The customized timestamp formatter.

  • A view modifier to provide a watermark text to be added to the signature image.

    Declaration

    Swift

    func watermarkText(_ watermarkText: String?) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

    Parameters

    watermarkText

    The watermark text to be added to the signature image.

  • A view modifier to change the alignment for the watermark text.

    Declaration

    Swift

    func watermarkTextAlignment(_ watermarkTextAlignment: NSTextAlignment) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

    Parameters

    wartermarkTextAlignment

    The watermark text alignment for the watermark text.

  • A view modifier to change the UIFont for the watermark text.

    Declaration

    Swift

    func watermarkTextFont(_ watermarkTextFont: UIFont) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

    Parameters

    watermarkTextFont

    The font for the watermark text.

  • A view modifier to provide a Color for the watermark text.

    Declaration

    Swift

    func watermarkTextColor(_ watermarkTextColor: Color) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>
  • A view modifier to indicate if stroke color is to be applied when displaying a saved signature image.

    Declaration

    Swift

    func appliesTintColorToImage(_ appliesTintColorToImage: Bool) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

    Parameters

    appliesTintColorToImage

    A boolean variable to indicate if stroke color is to be applied when displaying a saved signature image. The default is true.

  • A view modifier to indicate if the component is a mandatory field.

    Declaration

    Swift

    func isRequired(_ isRequired: Bool) -> SignatureCaptureView<StartActionView, RestartActionView, CancelActionView, ClearActionView, SaveActionView>

Available where StartActionView == _ConditionalContent<_Action, EmptyView>, RestartActionView == _ConditionalContent<_Action, EmptyView>, CancelActionView == _ConditionalContent<_Action, EmptyView>, ClearActionView == _ConditionalContent<_Action, EmptyView>, SaveActionView == _ConditionalContent<_Action, EmptyView>

Available where StartActionView == _Action

Available where RestartActionView == _Action

  • Undocumented

    Declaration

    Swift

    public init(
      title: String? = nil,
    @ViewBuilder startAction: () -> StartActionView,
    @ViewBuilder cancelAction: () -> CancelActionView,
    @ViewBuilder clearAction: () -> ClearActionView,
    @ViewBuilder saveAction: () -> SaveActionView,
    signatureImage: UIImage? = nil,
    onSave: ((UIImage) -> Void)? = nil,
    onDelete: (() -> Void)? = nil
      )

Available where CancelActionView == _Action

Available where ClearActionView == _Action

Available where SaveActionView == _Action

Available where StartActionView == _Action, RestartActionView == _Action

Available where StartActionView == _Action, CancelActionView == _Action

Available where StartActionView == _Action, ClearActionView == _Action

Available where StartActionView == _Action, SaveActionView == _Action

Available where RestartActionView == _Action, CancelActionView == _Action

  • Undocumented

    Declaration

    Swift

    public init(
      title: String? = nil,
    @ViewBuilder startAction: () -> StartActionView,
    @ViewBuilder clearAction: () -> ClearActionView,
    @ViewBuilder saveAction: () -> SaveActionView,
    signatureImage: UIImage? = nil,
    onSave: ((UIImage) -> Void)? = nil,
    onDelete: (() -> Void)? = nil
      )

Available where RestartActionView == _Action, ClearActionView == _Action

Available where RestartActionView == _Action, SaveActionView == _Action

Available where CancelActionView == _Action, ClearActionView == _Action

Available where CancelActionView == _Action, SaveActionView == _Action

Available where ClearActionView == _Action, SaveActionView == _Action

Available where StartActionView == _Action, RestartActionView == _Action, CancelActionView == _Action

  • Undocumented

    Declaration

    Swift

    public init(
      title: String? = nil,
    @ViewBuilder clearAction: () -> ClearActionView,
    @ViewBuilder saveAction: () -> SaveActionView,
    signatureImage: UIImage? = nil,
    onSave: ((UIImage) -> Void)? = nil,
    onDelete: (() -> Void)? = nil
      )

Available where StartActionView == _Action, RestartActionView == _Action, ClearActionView == _Action

Available where StartActionView == _Action, RestartActionView == _Action, SaveActionView == _Action

Available where StartActionView == _Action, CancelActionView == _Action, ClearActionView == _Action

Available where StartActionView == _Action, CancelActionView == _Action, SaveActionView == _Action

Available where StartActionView == _Action, ClearActionView == _Action, SaveActionView == _Action

Available where RestartActionView == _Action, CancelActionView == _Action, ClearActionView == _Action

  • Undocumented

    Declaration

    Swift

    public init(
      title: String? = nil,
    @ViewBuilder startAction: () -> StartActionView,
    @ViewBuilder saveAction: () -> SaveActionView,
    signatureImage: UIImage? = nil,
    onSave: ((UIImage) -> Void)? = nil,
    onDelete: (() -> Void)? = nil
      )

Available where RestartActionView == _Action, CancelActionView == _Action, SaveActionView == _Action

Available where RestartActionView == _Action, ClearActionView == _Action, SaveActionView == _Action

Available where CancelActionView == _Action, ClearActionView == _Action, SaveActionView == _Action

Available where StartActionView == _Action, RestartActionView == _Action, CancelActionView == _Action, ClearActionView == _Action

Available where StartActionView == _Action, RestartActionView == _Action, CancelActionView == _Action, SaveActionView == _Action

Available where StartActionView == _Action, RestartActionView == _Action, ClearActionView == _Action, SaveActionView == _Action

Available where StartActionView == _Action, CancelActionView == _Action, ClearActionView == _Action, SaveActionView == _Action

Available where RestartActionView == _Action, CancelActionView == _Action, ClearActionView == _Action, SaveActionView == _Action

Available where StartActionView == _Action, RestartActionView == _Action, CancelActionView == _Action, ClearActionView == _Action, SaveActionView == _Action