iOS9: UIDatePicker with datePickerMode of UIDatePickerModeTime only shows Hours, and no Minutes

后端 未结 6 1778
暗喜
暗喜 2021-02-14 07:13

I\'m using Xcode beta 7 with the iOS9 simulator. Using a UIDatePicker with a datePickerMode of UIDatePickerModeTime only shows Hours, and not minutes.

See screenshot:

6条回答
  •  独厮守ぢ
    2021-02-14 07:54

    On iPhone 5S iOS 9.1 my month names are truncated when I display the UIDatePicker. I fixed this problem by setting a local property as follows:

    NSLocale *uk = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
    NSCalendar *cal = [NSCalendar currentCalendar];
    [cal setLocale:uk];
    [_backdateDatePicker setCalendar:cal];
    

提交回复
热议问题