diff --git a/Sources/SpeziOnboarding/SignatureView.swift b/Sources/SpeziOnboarding/SignatureView.swift index c98f99a..260bc88 100644 --- a/Sources/SpeziOnboarding/SignatureView.swift +++ b/Sources/SpeziOnboarding/SignatureView.swift @@ -35,7 +35,7 @@ public struct SignatureView: View { #else @Binding private var signature: String #endif - private let name: PersonNameComponents + private let name: PersonNameComponents // TODO: allow to just specify a string! additional initializer for name components! private let lineOffset: CGFloat @@ -107,7 +107,7 @@ public struct SignatureView: View { /// - canvasSize: The size of the canvas as a Binding. /// - name: The name that is displayed under the signature line. /// - lineOffset: Defines the distance of the signature line from the bottom of the view. The default value is 30. - init( + public init( signature: Binding = .constant(PKDrawing()), isSigning: Binding = .constant(false), canvasSize: Binding = .constant(.zero), @@ -126,7 +126,7 @@ public struct SignatureView: View { /// - signature: A `Binding` containing the current text-based signature as a `String`. /// - name: The name that is displayed under the signature line. /// - lineOffset: Defines the distance of the signature line from the bottom of the view. The default value is 30. - init( + public init( signature: Binding = .constant(String()), name: PersonNameComponents = PersonNameComponents(), lineOffset: CGFloat = 30 diff --git a/Sources/SpeziOnboarding/SignatureViewBackground.swift b/Sources/SpeziOnboarding/SignatureViewBackground.swift index 79d072a..28cb9c7 100644 --- a/Sources/SpeziOnboarding/SignatureViewBackground.swift +++ b/Sources/SpeziOnboarding/SignatureViewBackground.swift @@ -13,6 +13,8 @@ import SwiftUI struct SignatureViewBackground: View { private let name: PersonNameComponents private let lineOffset: CGFloat + // TODO: add ability to show date! + #if !os(macOS) private let backgroundColor: UIColor #else