There is a initializer which can take a Double
and a format description , init(_:value:format:prompt:)
.
TextField("Weight", value: $mainViewVM.weightEntry.weight, format: .number.precision(.fractionLength(1)))
CLICK HERE to find out more related problems solutions.