0

Is it possible to change the height of UIPicker "Selection View"?

Max MacLeod
  • 25,335
  • 12
  • 98
  • 129
itsaboutcode
  • 23,435
  • 43
  • 107
  • 156

2 Answers2

1

It sounds like you're referring to the blue "selection port" that highlights the currently selected row. I was just looking in the documentation for that myself, and unfortunately, I do not think it's possible.

The only visual elements that appear to be editable, on UIPickerViewDelegate, are size-based:

Setting the Dimensions of the Picker View
pickerView:rowHeightForComponent:
pickerView:widthForComponent:

(Source: UIPickerViewDelegate reference.)

And the only thing that appears to be editable re: the "selection indicator" proper, is whether it is visible or not:

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIPickerView_Class/Reference/UIPickerView.html#//apple_ref/doc/uid/TP40006842

JKubecki
  • 569
  • 5
  • 8
  • Yah I am looking for the same thing, but there is no help on it :( – itsaboutcode Jan 16 '11 at 02:37
  • Actually, I was thinking about this, and I'm fairly new at iPhone dev, so I'm not exactly sure HOW you'd go about this, but you might be able to hide the selection indicator, and then overlay an image of your own with an alpha channel or something, and pass through or ignore the events. (Again, I'm fairly new at this, so I'm not sure of the details, but conceptually it makes sense.) – JKubecki Jan 16 '11 at 03:03
-1

I am not sure whether you are referring to the whole UIPickerView in which case you can look here: How to change UIPickerView height

Or, if you are meaning the individual component size in which case you can look here: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIPickerViewDelegate_Protocol/Reference/UIPickerViewDelegate.html#//apple_ref/occ/intfm/UIPickerViewDelegate/pickerView:rowHeightForComponent:

Community
  • 1
  • 1
Matthew Leffler
  • 1,354
  • 1
  • 23
  • 36