Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to use SignatureView #60

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Sources/SpeziOnboarding/SignatureView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#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!

Check failure on line 38 in Sources/SpeziOnboarding/SignatureView.swift

View workflow job for this annotation

GitHub Actions / SwiftLint / SwiftLint / SwiftLint

Todo Violation: TODOs should be resolved (allow to just specify a string...) (todo)
private let lineOffset: CGFloat


Expand Down Expand Up @@ -107,7 +107,7 @@
/// - 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<PKDrawing> = .constant(PKDrawing()),
isSigning: Binding<Bool> = .constant(false),
canvasSize: Binding<CGSize> = .constant(.zero),
Expand All @@ -126,7 +126,7 @@
/// - 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<String> = .constant(String()),
name: PersonNameComponents = PersonNameComponents(),
lineOffset: CGFloat = 30
Expand Down
2 changes: 2 additions & 0 deletions Sources/SpeziOnboarding/SignatureViewBackground.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
struct SignatureViewBackground: View {
private let name: PersonNameComponents
private let lineOffset: CGFloat
// TODO: add ability to show date!

Check failure on line 16 in Sources/SpeziOnboarding/SignatureViewBackground.swift

View workflow job for this annotation

GitHub Actions / SwiftLint / SwiftLint / SwiftLint

Todo Violation: TODOs should be resolved (add ability to show date!) (todo)

#if !os(macOS)
private let backgroundColor: UIColor
#else
Expand Down
Loading