答案 0 :(得分:0)
在选定值更改时设置字体
func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
for index in 0 ..< self.pickerView(pickerView, numberOfRowsInComponent: component) {
if index != row {
// reset to unselected font for this index here
// ...
} else {
// apply the selected font for this index here
// ...
}
}
}
要自定义字体,您可能需要使用Kamran指出的pickerView(UIPickerView, viewForRow: Int, forComponent: Int, reusing: UIView?)
。