How can I convert between currencies in Objective-C, using either the Cocoa or Cocoa Touch frameworks?
How can I convert between currencies in Objective-C, using either the Cocoa or Cocoa
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, aren’t you a lucky fellow:
https://github.com/davedelong/DDUnitConverter
Simply copy the entire “DDUnitConverter” subfolder into your project, then do:
That will convert £42 to USD$.
Rates are pulled from the IMF automatically, but if you really need to, you can invoke
-refreshExchangeRateson your unit converter instance.The
-convertNumber:fromUnit:toUnit:call will block until the rates can be downloaded and parsed. Subsequent calls will just use the already-downloaded exchange rates.