I have the following variable:
NSNumber *consumption = [dict objectForKey:@\"con\"];
Which returns 42. How can I pad this number to 10 dig
You can do pretty much any number formatting you would ever want with NSNumberFormatter. In this case I think you would want to use the setFormatWidth: and setPaddingCharacter: functions.