UIDatePicker - Problem Localizing

前端 未结 4 1139
南方客
南方客 2020-12-06 11:24

I\'ve created a UIDatePicker in my app and I also have support for several languages. My UIDatePicker is created in Interface Builder, and I have created a seperate localiz

4条回答
  •  春和景丽
    2020-12-06 11:34

    After further investigation, this is actually not handled by the language setting of the iPhone. The UIDatePicker is automatically localized based on the "Region Format" setting and not the language. This is odd because the dates are localized, so you would think the localization of the picker would be linked to the iDevice's language not the Region Format.

    Anyway, to simulate the localized DatePicker in the Simulator:

    1. Exit your app, go to Settings.
    2. Select General
    3. Select International
    4. Select the bottom option, Region Format.
    5. Change to the desired region.
    6. Relaunch your app and see the new UI Picker!

提交回复
热议问题