A SwiftUI Property Wrapper To Specify Decimal Places For Floating-Point Numbers
Daily Coding Tip 033

Like yesterday this tip is a property wrapper, but what it does is a bit more simple. It will round to the number of decimal places you specify, which is helpful for situations where you want to display the value of a floating-point number in SwiftUI. You’ll notice that this property wrapper takes a generic type that conform…


