iOS 设置UIDatePiicer为24小时制

直接上代码:

NSDateFormatter* dateFormatter = [[NSDateFormatter alloc] init];
    [dateFormatter setDateFormat:@"HH:mm"];
    
    NSDate *date = [dateFormatter dateFromString:@"00:00"];
    
    
    _datePicker.date = date;

转载于:https://www.cnblogs.com/pretty-guy/p/4810335.html

猜你喜欢

转载自blog.csdn.net/weixin_33873846/article/details/93438701