Closed liunianhuaguoyanxi closed 5 months ago
BRDatePickerView datePickerView = [[BRDatePickerView alloc]init]; // 2.设置属性 datePickerView.pickerMode = BRDatePickerModeHM; datePickerView.showUnitType = BRShowUnitTypeAll; datePickerView.resultBlock = ^(NSDate selectDate, NSString *selectValue) { NSLog(@"选择的值:%@", selectValue); }; // 3.显示 [datePickerView show]; 中文默认有显示单位,但是英文下无单位 设置了BRShowUnitTypeAll,英文下也没有显示单位
新增了如下属性:
/** * 自定义日期单位 * 字典格式:@{@"year": @"年", @"month": @"月", @"day": @"日", @"hour": @"时", @"minute": @"分", @"second": @"秒"} */ @property (nonatomic, copy) NSDictionary *customUnit;
BRDatePickerView datePickerView = [[BRDatePickerView alloc]init]; // 2.设置属性 datePickerView.pickerMode = BRDatePickerModeHM; datePickerView.showUnitType = BRShowUnitTypeAll; datePickerView.resultBlock = ^(NSDate selectDate, NSString *selectValue) { NSLog(@"选择的值:%@", selectValue); }; // 3.显示 [datePickerView show]; 中文默认有显示单位,但是英文下无单位 设置了BRShowUnitTypeAll,英文下也没有显示单位