我在iphone日期选择器中遇到了本地化问题。我希望日期选择器只显示英文日期,但现在它会根据iphone设置中的语言进行显示。我尝试了许多方法都没有用,像下面这样。
- setting the locale setting in the nib file of the uidatepicker.
setting the locale through code
NSLocale* locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_GB"]; [datePicker setLocale:locale]; [datePicker setCalendar:[locale objectForKey:NSLocaleCalendar]];
这个方法没有起作用。如果有人有好的想法来解决这个问题,请帮忙。