Redwood
Redwood

Reputation: 69312

How do I get the "Measurement Units" setting from OS X?

I want my app to display measurements in US or Metric based on the chosen setting in OS X's International preference pane.

How do I get this piece of information from the OS in my code?

Upvotes: 1

Views: 183

Answers (1)

Redwood
Redwood

Reputation: 69312

Use

BOOL usesMetic = [[[NSLocale currentLocale] objectForKey:NSLocaleUsesMetricSystem] boolValue];

Upvotes: 4

Related Questions