Eureka
Eureka copied to clipboard
Decimal row three decimal places
Is it possible to set more than two decimal places using the DecimalRow? Perhaps a way to set n number of characters after the dot would be good.
You can change the formatter
of the row, or change the current one
DecimalRow.defaultCellSetup = { cell, row in let numberFormatter = NumberFormatter() numberFormatter.locale = Locale.current numberFormatter.numberStyle = .decimal numberFormatter.minimumFractionDigits = 2 numberFormatter.maximumFractionDigits = 2
row.formatter = numberFormatter
}