Resizing the height of the selection indicator in a UIPickerView
in an App I have to maintain I had to set the rowHeight of a UIPickerView row to the value of 66. Now it can properly display three lines of text.
- (CGFloat)pickerView:(UIPickerView *)pickerView rowHeightForComponent:(NSInteger)component {
return 66;
}
Now the selection indicator height is too small for a row. Can anybody help me finding out how I can increase the heigh开发者_JS百科t of that selection indicator?
Many thanks in advance. Uwe
Unfortunately it's impossible.
But if you want a useful selection indicator, the solution is to draw a custom selection indicator with proper dimensions (The background must be transparent) and then adds to the UIPickerView as a subview (Don't forget to set the frame correctly). So the result will be a UIPickerView with an UIImageView in the middle that represents the selection indicator.
I hope it helps,
Arildo
精彩评论