I agree that something needs to change.
You chose the same change I made to get it working.
However, arguably the correct change is
to use the value in pounds to do the computations.
That is, instead of:
CGFloat sampleWeight = [entry weightInUnit:unit];
to get the values you would use
CGFloat sampleWeight = entry.weightInLbs;
Sorry I didn't reply earlier, but I wanted to wait until I had time to really look at the code.
Good catch. When using Kg, it would convert the weight value twice. I'd recommend the solution proposed by Charlie Price, just change the weightInUnit: calls to weightInLbs.
Specifically, on line 73:
CGFloat weight = [currentEntry weightInLbs];
and on line 92:
CGFloat sampleWeight = [entry weightInLbs];
I hope that helps.
-Rich-
The weight entry when unit is set to kg is displayed incorrectly at the DetailViewController.
In the viewDidAppear method within the DetailViewController, all the stringForWeightInLbs:inUnit: method should be replaced by stringForWeight:ofUnit:, I think.