Closed CypherPoet closed 4 years ago
It looks like the previous commit might have used Xcode 11.4, which compiles the code cleanly. I wonder whether in this instance using Text("\(value, specifier: "%.2f")")
would be an easier change? It should compile just fine on Xcode 11.3. Thoughts?
Ah, that does compile successfully, too.
Another advantage of NumberFormatter
is that the string is automatically localized (wrt the decimal symbol, for example), but I could go with the specifier
solution if you think the extra overhead isn't worth it.
That's a great reason to go with your solution – thank you!
Fixes https://github.com/twostraws/ControlRoom/issues/72
See explanation here