-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjusted demo application to include all configuration options
- Loading branch information
benedom
committed
Apr 16, 2024
1 parent
be22624
commit 5e45542
Showing
7 changed files
with
118 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import SwiftUI | ||
|
||
struct DecimalTextField: View { | ||
@Binding var value: CGFloat | ||
private let decimalFormatter: NumberFormatter = { | ||
let formatter = NumberFormatter() | ||
formatter.numberStyle = .decimal | ||
formatter.allowsFloats = true | ||
formatter.minimumFractionDigits = 1 | ||
formatter.decimalSeparator = "." | ||
return formatter | ||
}() | ||
|
||
var body: some View { | ||
TextField("maxMagnification", value: $value, formatter: decimalFormatter) | ||
.textFieldStyle(RoundedBorderTextFieldStyle()) | ||
.multilineTextAlignment(.trailing) | ||
.keyboardType(.decimalPad) | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
public enum MaskShape { | ||
public enum MaskShape: CaseIterable { | ||
case circle, square | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters