2016-11-30 3 views

ответ

1

Вы можете использовать attributedTitleForRow для установки атрибутной строки. В атрибутной строке вы можете определить цвет текста.

2

Добавить сильфона метод Делегат UIPickerView

func pickerView(pickerView: UIPickerView, attributedTitleForRow row: Int, forComponent component: Int) -> NSAttributedString? { 
     let attributedString = NSAttributedString(string: "Your string name here", attributes: [NSForegroundColorAttributeName : UIColor.redColor()]) 
     return attributedString 
    } 
+0

Это метод 'UIPickerViewDelegate'. – dasdom

Смежные вопросы