开发者

Iphone UIPickerView: Change selector height

开发者 https://www.devze.com 2023-02-10 14:29 出处:网络
is it possible to change 开发者_JS百科the selector height on a picker view? ThanksImplement this in your picker delegate

is it possible to change 开发者_JS百科the selector height on a picker view?

Thanks


Implement this in your picker delegate

pickerView:rowHeightForComponent:

From UIPickerViewDelegate Reference:

Called by the picker view when it needs the row height to use for drawing row content.

- (CGFloat)pickerView:(UIPickerView *)pickerView rowHeightForComponent:(NSInteger)component
  • Parameters

    pickerView - The picker view requesting this information.

    component - A zero-indexed number identifying a component of pickerView. Components are numbered left-to-right.

    Return Value - A float value indicating the height of the row in points.


no it is not possible to change the height of SelectionIndicator. the only way to achieve is, to add a custom view on the controller's view(or where-ever you are adding your picker) and animate it with PickerView(because it is not possible to add UIView on top of UIPickerView)

0

精彩评论

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

关注公众号