This method. doesn't "get the width of the component ...". The selector calls this method to ask you how wide the component should be.
Your method may be as simple as:
func pickerView(pickerView: UIPickerView, widthForComponent component: Int) -> CGFloat { return CGFloat(25.0) }
(or any width is suitable for your kind of choice)
You just need to pass the result to an extended type.
Duncan c
source share