agiapp / BRPickerView

BRPickerView 封装的是iOS中常用的选择器组件,主要包括:日期选择器(支持年月日、年月等15种日期样式选择,支持设置星期、至今等)、地址选择器(支持省市区、省市、省三种地区选择)、自定义字符串选择器(支持单列、多列、二级联动、三级联动选择)。支持自定义主题样式,适配深色模式,支持将选择器组件添加到指定容器视图。
https://github.com/agiapp/BRPickerView
MIT License
2.55k stars 442 forks source link

底部间距问题依然存在,版本号2.7.7 #275

Closed CocoaJerry closed 5 months ago

CocoaJerry commented 2 years ago
image
agiapp commented 2 years ago

代码

BRDatePickerView *datePickerView = [[BRDatePickerView alloc]init];
datePickerView.pickerMode = BRDatePickerModeYMD;
datePickerView.title = @"年月日";
datePickerView.isAutoSelect = YES;
datePickerView.maxDate = [NSDate date];
datePickerView.resultBlock = ^(NSDate *selectDate, NSString *selectValue) {

};

// 自定义弹框样式
BRPickerStyle *customStyle = [[BRPickerStyle alloc]init];
// customStyle.alertViewColor = [UIColor clearColor]; // 不需要设置alertViewColor的颜色
customStyle.topCornerRadius = 16.0f;
customStyle.doneTextColor = [UIColor blueColor];
customStyle.selectRowTextColor = [UIColor blueColor];
datePickerView.pickerStyle = customStyle;

[datePickerView show];

效果

image

CocoaJerry commented 2 years ago

发现问题了,只要设置了alertViewColor就会出现这种情况

agiapp commented 2 years ago

如果要设置弹框的背景颜色,设置pickerColor即可。alertViewColor默认等于pickerColor,要保持这两个颜色一致

CocoaJerry commented 2 years ago

好的,谢谢