我在iphone日期选择器中遇到了本地化的问题.我希望日期选择器只用英语显示日期,但现在它需要在iphone设置中设置为该区域的语言.我尝试了各种有用的东西,如下所示.
通过代码设置语言环境
NSLocale* locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_GB"];
[datePicker setLocale:locale];
[datePicker setCalendar:[locale objectForKey:NSLocaleCalendar]];
Run Code Online (Sandbox Code Playgroud)这没用.如果有任何人有好的想法来解决这个问题,请帮忙