UIDatePicker locale does nothing?

前端 未结 2 928
难免孤独
难免孤独 2021-01-21 02:25

I\'m creating a UIDatePicker programmatically, and setting its locale with the following code:

datePicker.locale = [[[NSLocale alloc] initWithLocaleIdentifier:@\         


        
2条回答
  •  心在旅途
    2021-01-21 03:09

    As answered here Can I localize a UIDatePicker?, the picker display depends on country settings, not on language settings.

    In your example you are changing the language locale only.

提交回复
热议问题