开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜