UIPickerView 设置上下2根横线颜色OC代码
可以通过以下代码来设置UIPickerView的上下两根横线的颜色:
// 设置上下两根横线的颜色
pickerView.subviews[1].backgroundColor = [UIColor redColor]; // 上横线
pickerView.subviews[2].backgroundColor = [UIColor blueColor]; // 下横线
其中,pickerView是你的UIPickerView对象。上横线的索引为1,下横线的索引为2。你可以根据需要修改横线的颜色。
原文地址: https://www.cveoy.top/t/topic/iiIr 著作权归作者所有。请勿转载和采集!