zoukankan      html  css  js  c++  java
  • UIDatePicker设置为24小时制

            self.startDateView = [[UIDatePicker alloc] initWithFrame:CGRectMake(0, screenHight - 300, screenWidth, 300)];

            self.startDateView.backgroundColor = UIColor.whiteColor;

            //设置本地时间为中国

            self.startDateView.locale = [NSLocale localeWithLocaleIdentifier:@"ch"];

            //日期显示格式

            self.startDateView.datePickerMode = UIDatePickerModeTime;

            

            //设置为24小时制

            NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_GB"];

            self.startDateView.locale = locale;

            self.startDateView.minimumDate = [NSDate date]; // 最小时间

            

            [self.view addSubview:self.startDateView];

  • 相关阅读:
    1104
    HDU 1575
    hdu 1142(DFS+dijkstra)
    hdu 1015(DFS)
    hdu 1342(DFS)
    hdu 1181(DFS)变 形 课
    hdu 1312(DFS)
    hdu 5976 Detachment
    hdu 5795
    UVa 11729
  • 原文地址:https://www.cnblogs.com/-ios/p/9708881.html
Copyright © 2011-2022 走看看