I am creating a budget application that allows the user to enter their budget, as well as transactions. I need to allow the user to enter both pensions and kilograms from separate text fields, and they need to be formatted along with currency symbols. I am working fine at the moment, but I want to make it localized as it currently only works with GBP. I tried my best to hide the NSNumberFormatter examples from Objective-C to Swift.
My first problem is that I need to set placeholders for input fields for a specific user location. For example. Pounds and pence, dollars and cents, etc.
The second problem is that the values entered in each of the text fields, such as 10216 and 32, must be formatted and you need to add a currency symbol that is specific to the location of users. Thus, it will become £ 10,216.32 or $ 10,216.32, etc.
In addition, I need to use the result of a formatted number in the calculation. So, how can I do this without running into problems, without running into problems with the currency symbol?
Any help would be greatly appreciated.
swift nsnumberformatter
user3746428 Jul 25 '14 at 16:47 2014-07-25 16:47
source share