I have got a float value which is supposed to have a certain number of decimal places. The number of decimal places is stored in a variable.
Here is the line of code:
self.numberTextField.text = [NSString stringWithFormat:@"%.%df",result, [[NSUserDefaults standardUserDefaults] boolForKey:@"decimalPlaces"]];
My problem is that I do not know how to combine the %f and %d specifiers in the right way. Any ideas?
Thank for your answer!