BRPickerView icon indicating copy to clipboard operation
BRPickerView copied to clipboard

希望能够添加一个设置选中行的颜色

Open CFH-Steven opened this issue 5 years ago • 1 comments

想要配置选中行和未选中行的颜色,这个选择器可以怎么配置呢?

CFH-Steven avatar Feb 22 '20 07:02 CFH-Steven

请更新到最新版本,新增支持设置选中行颜色的功能

参考代码

BRDatePickerView *datePickerView = [[BRDatePickerView alloc]init];
datePickerView.pickerMode = BRDatePickerModeYMD;
datePickerView.title = @"请选择年月日";
datePickerView.resultBlock = ^(NSDate *selectDate, NSString *selectValue) {
    NSLog(@"selectValue=%@", selectValue);
};
// 设置自定义样式
BRPickerStyle *customStyle = [[BRPickerStyle alloc]init];
customStyle.alertViewColor = [UIColor groupTableViewBackgroundColor];
customStyle.selectRowColor = [UIColor orangeColor]; // 设置选择器选中行的背景颜色
customStyle.separatorColor = [UIColor clearColor];  // 隐藏选择器中间的两条分割线
datePickerView.pickerStyle = customStyle;

[datePickerView show];

效果图

image

agiapp avatar Feb 24 '20 10:02 agiapp