-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would love to see a currency field / row added. (Formatters) #9
Comments
@btripp |
That would be nice. I think I know what he is talking about. I made a component to format a NSNumber given a currencyCode, for example. What would be great is a field where you set a value (NSNumber), and a currencyCode (BRL, USD, etc..) and it formats the number for you like R$ 1.234,00 or US$ 1,234.00. A price field. If you want to take a look at my component: |
TextField rows provided by default have a formatter property that can be used to set up any formatter. for instance: DecimalRow(){
$0.useFormatterDuringInput = true
$0.title = "Currency style"
$0.value = 2015
let formatter = CurrencyFormatter()
formatter.locale = NSLocale.currentLocale()
formatter.numberStyle = NSNumberFormatterStyle.CurrencyStyle
$0.formatter = formatter
} I think that setting up the formatter is enough and there is no need to use a different row. |
No description provided.
The text was updated successfully, but these errors were encountered: