Skip to content

Commit 712ddd1

Browse files
committed
修改toolbar边框
1 parent 09a1977 commit 712ddd1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ios/Pickers/AbstractActionSheetPicker.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,12 @@ - (UIToolbar *)createPickerToolbarWithTitle:(NSString *)title {
482482
pickerToolbar.layer.borderWidth = 0;
483483
pickerToolbar.layer.borderColor = [[UIColor colorWithWhite:1 alpha:0] CGColor];
484484
} else {
485-
pickerToolbar.layer.borderWidth = 1;
486-
pickerToolbar.layer.borderColor = [[UIColor colorWithRed:0.812 green:0.839 blue:0.859 alpha:1] CGColor];
485+
CALayer *bottomBorder = [CALayer layer];
486+
bottomBorder.frame = CGRectMake(0.0f, pickerToolbar.frame.size.height - 1.0f, pickerToolbar.frame.size.width, 0.5f);
487+
bottomBorder.backgroundColor = [[UIColor colorWithRed:0.812 green:0.839 blue:0.859 alpha:1] CGColor];
488+
[pickerToolbar.layer addSublayer:bottomBorder];
489+
pickerToolbar.layer.borderColor = [[UIColor whiteColor] CGColor];
490+
pickerToolbar.clipsToBounds = NO;
487491
}
488492

489493
NSMutableArray *barItems = [[NSMutableArray alloc] init];

0 commit comments

Comments
 (0)