Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在开发 iOS 应用程序时使用 islamicUmmAlQura UIDatePicker,如下 图所示
我有两个问题总结如下:
1- 出现在文本字段中的日期是公历,而我的 UIDatePicker 是伊斯兰(回历)见图
2-有时文本字段中的天数高于正常值!见图_
我在 github 上有一个扩展来转换日期。看一看。我的是波斯日期,所以你只需要在扩展名中用我的替换下面的代码:
datePicker.calendar = Calendar(identifier: .islamicUmmAlQura)
[ https://github.com/Fridday/PersianDatePicker][1]