Sunday, March 23, 2014

Currency Formatting to Double Digit (Dollars and Cents) (iOS Development)

    NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init] ;
    [numberFormatter setNumberStyle: NSNumberFormatterCurrencyStyle];
    NSString *numberAsString = [numberFormatter stringFromNumber:order.orderAmount];


    totalPrice = [totalPrice stringByAppendingString:numberAsString];

No comments:

Post a Comment