Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 653163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:21:05+00:00 2026-05-13T22:21:05+00:00

I am a N00b here . I print my currency like this : -(IBAction)buttonPressed1:(id)sender

  • 0

I am a N00b here .

I print my currency like this :

-(IBAction)buttonPressed1:(id)sender
    {
        double currency = [Amount1.text doubleValue] + [Amount2.text doubleValue]; 
        SumCurrency.text = [NSString stringWithFormat:@"%0.0f", answer];
    }

I just simply want to use NSSNumberFormatter to print the SumCurrency.text in US Currency format .. Having a lot of trouble with it ..Please hekp

same issue ??? http://groups.jonzu.com/z_apple_using-a-nsnumberformatter-with-a-uitextfield.html

Thanks in Advance .

Regards ,
N00b

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:21:06+00:00Added an answer on May 13, 2026 at 10:21 pm

    I got the answer .. But for anyone’s future reference

    -(IBAction)buttonPressed1:(id)sender {
         double currency = [Amount1.text doubleValue] + [Amount2.text doubleValue]; 
         NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];                
         [numberFormatter setNumberStyle: NSNumberFormatterCurrencyStyle];
         NSString *numberAsString = [numberFormatter stringFromNumber:[NSNumber numberWithFloat:currency]];
         SumCurrency.text = [NSString stringWithFormat:@"Converted:%@",numberAsString]; 
    }
    

    or, in Swift:

    let amount = 123.56
    let formatter = NumberFormatter()
    formatter.locale = Locale.current
    // or
    // f.locale = Locale(identifier: "it_IT")
    formatter.numberStyle = .currency
    
    let formattedAmountSting = formatter.string(for: amount)!
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This feels like an extremely n00b question, but here goes... I have a series
OK n00b here with SOAP, Would like some clarification on how to use SOAP.
Serious n00b warning here; please take mercy! So I finished the Nerd Dinner MVC
Here is a n00b question, but one I can't seem to solve reading my
total n00b question here but I can't seem to find the answer searching around
N00b here, having problems escaping strings. I used the QuotedStr() function - shouldn't that
/is n00b Through the gift of knowledge and expertise encoded here, I am doing
i got a n00b problem with python and i've been searching here for a
I realize this is a total n00b question, but I'm curious and I thought
n00b here (first Android project). I have been given a custom video codec that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.