Questions tagged [nsmeasurement]

3 questions
0
votes
1 answer

Force NSMeasurementFormatter to get value over 1 with NSMeasurementFormatterUnitOptionsNaturalScale optiion

If we put the value 100g into a NSUnit and use NSMeasurementFormatterUnitOptionsNaturalScale to get a translated String, the result is 3.52 oz for Imperial system. The problem is with Metric, the result is 0,1 kg which is the good value but i need…
0
votes
1 answer

Add more conversion units to existing apple classes of conversion

Is it possible to add more conversion units to existing apple classes of conversion ? https://developer.apple.com/documentation/foundation/unittemperature On above link Rankine is not available. How to customize/extend this class and add Rankine…
jeet.chanchawat
  • 5,842
  • 5
  • 38
  • 59
0
votes
2 answers

NSMassFormatter can't convert grams to lbs (NSUnitMass) or display value

I am trying to modernize my API calls and want to utilize NSMassFormatter. The problem is simple. I can't get any output (aiming for imperial locale). NSMeasurement's description is correct. How to make NSMassFormatter to display "123 lbs" weight…
Marek H
  • 5,173
  • 3
  • 31
  • 42