|
|
|
Not exactly sure where your problem lies, but the following link contains a lot of information on currency symbols and currency formatting: As you can see, changing the currency symbol is easy. The difficulty lies in getting the formatting right. |
|
Hi, Not sure if your are talking about the same issue I had - In one of the first projects (the tip calculator) I was using the local currency but kept getting $ - I had to change the regional settings in the phone simulator to UK before I could get £ Greenie |
|
For me, even this was not enough. I did get the right symbol, but I also wanted local formatting (thousands separator, etc). For this,I had to change the development language. See https://developer.apple.com/forums/thread/706739. |
|
|
|
To (freely) quote Obelix from another thread: Do you want the answer, or do you want to learn? If the latter, here is something to help you on your way. It all depends on how you read the challenge. If all you want to do is choose the user's preferred currency symbol for him/her, (assuming you know what it is), all you have to do is review the lesson, and the answer will be staring you in the face. This is how I understood the challenge, and it is really easy to do. (Do you perhaps copy the code from the lesson into your project? Then the solution would be easy to miss. Or do you enter it manually? You should!) If, however, you read the challenge as: Let the user choose the currency symbol while using the app, then you will need to create some dialog. Ask yourself: How would that look like? Maybe you want to let the user choose from a list you provide. What type of view do you know that allows you to do that? Or maybe you want to do it differently. It is up to you. Good luck. |
SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's all new Paywall Editor allow you to remotely configure your paywall view without any code changes or app updates.
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.