1

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 height of that selection indicator?

Many thanks in advance. Uwe

4

1 回答 1

2

不幸的是,这是不可能的。

但是如果你想要一个有用的选择指示器,解决方案是绘制一个具有适当尺寸的自定义选择指示器(背景必须是透明的),然后作为子视图添加到 UIPickerView(不要忘记正确设置框架)。所以结果将是一个 UIPickerView,中间有一个 UIImageView 代表选择指示器。

我希望它有所帮助,

阿里尔多

于 2011-11-03T06:25:20.547 回答