I'm creating the app in "Herbrew" language. (Language of IPhone can be anything, but my app runs only in Herbrew). In iOS for UIDatePicker, we have a property "locale" which will change the language that it is displaying. But in iOS5, the property is deprecated. How can I achieve it now?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
Unfortunately, you cannot achieve this, not even with the calendar trick described by Martin Ulrich. I've struggled with the same problem myself and after a long research, I found out the bitter truth: the only way to change the localization of the UIDatePicker is to change the device's language.
If the user will have the app's language as Hebrew, everything will be alright. If not, there's nothing you can do, except maybe create your own date picker. Sorry
You can set the
calendar
property of the UIDatePicker to[NSCalendar currentCalendar]