Determine user's “Temperature Unit” setting on iOS 10 (Celsius / Fahrenheit)

后端 未结 5 1331
既然无缘
既然无缘 2020-12-06 05:49

iOS 10 adds the ability for the user to set their \"Temperature Unit\" choice under Settings > General > Language & Region > Temperature Unit.

How can my app pro

5条回答
  •  被撕碎了的回忆
    2020-12-06 06:30

    The correct answer is from Fabio's comment to pedrouan's answer, which references Apple's response on the forums: https://forums.developer.apple.com/thread/70258.

    The Simulator does not respect the Temperature Unit setting, but real devices do respect that setting. Using MeasurementFormatter in the Simulator will always use the locale's default unit, but using MeasurementFormatter on a real device will use the user's selected Temperature Unit.

提交回复
热议问题