iOS Code Snippet make datepicker Chinese style

B4X:
'将datepicker设置成中文版
Private Sub setdatepickerch(dp As DatePicker)
    Dim jo As NativeObject
    jo=Me
    jo.RunMethod("setdploc:",Array(dp))
End Sub
#if OBJC
- (void) setdploc:(UIDatePicker*)datePicker{
    NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"zh_CN"];//设置为中文
    datePicker.locale = locale;
}
#end if
 
Top