Show Hebrew Months in UIDatePicker?

你离开我真会死。 提交于 2019-12-11 05:55:01

问题


Is there a way to show hebrew month names in a UIDatePicker instead of Gregorian ones? How? Can this be set programmatically?


回答1:


There is a bug in UIDatePicker that prevents it from correctly honoring the calendar property (which is how you're supposed to do this). Please file a bug report and it will be fixed.




回答2:


If you are using IB to create your view you can add a UIDatePicker and set its Locale property to "Hebrew".




回答3:


I don't think that is possible, however you can create your own UIPickerView to display hebrew months instead.

It looks like UIDatePicker has this property but has now been deprecated for ios 5.0

locale
The locale used by the date picker. (Deprecated in iOS 5.0.)

@property(nonatomic, retain) NSLocale *locale


来源:https://stackoverflow.com/questions/9521600/show-hebrew-months-in-uidatepicker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!