Can someone confirm that this is to convert a NSString
to Is the correct way to NSDecimalNumber
? I have a label where you click the button on which the price appears, which is the total value is clamped
and then I have all the strings where it is calculated. thank you in advanced!
- Quantity of IBAction: Sender {NSString * priceStringOne = [hidden PriceWinTF text]; Float pricefloton = [value stringing NSNumberFormer]; NSString * priceStringTwo = [hidden PriceTwoTF text]; Float Price FloatTube = [Value Floating Two Float Value]; NSString * priceStringThree = [hidden PriceThreeTF text]; Float Price Floatthree = [Value Stringthree Float Value]; NSString * priceStringFour = [hidden PriceFirstTF text]; Float price flotoffor = [value stringfour float value]; NSString * quanityStringOne = [quanityFirstTF text]; Float quanityFloatOne = [quanityStringOne float value]; NSString * quanityStringTwo = [quanitySecondTF text]; Float quatity floatu = [quanityStringTwo floatValue]; NSString * quanityStringThree = [quanityThirdTF text]; Float quote floatthree = [quality string float value]; NSString * quanityStringFour = [quanityFourthTF text]; Float QUANTITY FlatFor = [quality stringfor flat value]; Float totalAMM = feefloton * nanitflatone + priceflotTue * nanitflattovo + priceflotthree * nanitiflotthree + pricephlofafure * ninityflatfor; NSString * Result = [NSString stringWithFormat: @ "$% 0.2f", total amount]; [Set value of total value: result]; NSString * totalPrice = totalPriceCalculated.text; NSDecimalNumber * totalPriceNumber = (NSDecimalNumber *) total value; } NSString * priceStringOne = [hiddenPriceOneTF text]; Float pricefloton = [value stringing NSNumberFormer];
Renew *
PayPal payment * payment = [[PayPal payment light] init] ; Payment.amount = [NSDecimalNumber decimal assemblywithString: TotalPrice number]; Payment currency.code = @ "USD"; Payment.shortDescription = @ "Hipster T-Shirt";
Another option is to create a decimal number from float
: < / P> NSDC merger * TotalPrice number = [NSDC merged decimal decimalthat decimal: [@ (total amount) decimal value]];
Comments
Post a Comment