BRPickerView icon indicating copy to clipboard operation
BRPickerView copied to clipboard

你好,通过两种不同的方式显示PickerView,UI效果不一致

Open MrCodeHauler opened this issue 1 year ago • 0 comments

UIView *contentView = [[UIView alloc] initWithFrame:CGRectMake(0, 100, 280, 300)];
contentView.backgroundColor = UIColor.whiteColor;
[self.view addSubview:contentView];

BRStringPickerView *stringPickerView = [[BRStringPickerView alloc]init];
stringPickerView.pickerMode = BRStringPickerComponentSingle;
stringPickerView.title = @"请选择学历";
stringPickerView.plistName = @"testData.plist";
stringPickerView.isAutoSelect = YES;
stringPickerView.resultModelBlock = ^(BRResultModel *resultModel) {
    self.educationSelectIndex = resultModel.index;
    self.infoModel.educationStr = resultModel.value;
};

BRPickerStyle *customStyle = [[BRPickerStyle alloc]init];
if (@available(iOS 13.0, *)) {
    customStyle.pickerColor = [UIColor secondarySystemBackgroundColor];
} else {
    customStyle.pickerColor = BR_RGB_HEX(0xf2f2f7, 1.0f);
}
customStyle.rowHeight = 60;
stringPickerView.pickerStyle = customStyle;

[stringPickerView addPickerToView:contentView];

通过以上方式,将PickerView添加至ContentView显示后,效果不一样,如下图 image

若是通过该方式[stringPickerView show]; 显示PickerView,效果如下 image 请问这是什么原因造成,还是设计如此呢,麻烦有空指教下,谢谢

MrCodeHauler avatar Aug 15 '23 10:08 MrCodeHauler