'iOS 14 UIPickerView color of the selected row
Solution 1:[1]
Just to clarify, the code:
if #available(iOS 14.0, *) { pickerView.subviews[1].backgroundColor = .clear }
needs to go in the following protocol method:
func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView {
}
Solution 2:[2]
if #available(iOS 14.0, *) { pickerView.subviews[1].backgroundColor = .clear }
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | caminante errante |
Solution 2 | Ray Lei |