So, my converter app is finally working, but with one major problem. It’s not working on the IRL iPhone, just the simulator iPhone.
Like this (IRL iPhone):

And the simulator phone does the same thing like this:

IDK Why this one is so much smaller.
Only difference I can find is that my phone is in Norwegian, so the keyboard on there got a comma ‘,’ instead of a period ‘.’
Code for the stuff that calculates it is here http://pastebin.com/nGaw7Agj
TLDR the irl iphone does not do the right thing, but the xcode simulator does.
That is the answer. Since you have different locale, the first one gets rounded off to 13, instead of 13.37. I don’t know what quantities you are working with here, but in both cases, you seem to be multiplying with a constant ~133.4247, so the calculation is the same in both cases.
The problem is that you are not using
NSNumberFormatterwhen reading the values from the strings.NSNumberFormatterwill take care of locale for you. Using[NSString floatValue]is a very crude way of converting a string to a number, and you have no control over locale conversions.In this line
I would suggest changing to