CodePudding user response:
maybe things have changed. You could try this instead:
Text(Measurement( value: 47, unit: UnitEnergy.kilocalories)
.formatted(
.measurement(
width: .abbreviated,
usage: .workout,
numberFormatStyle: .number.precision(.fractionLength(0))
)
)
)