Instance Method

rowSize(forComponent:)

Returns the size of a row for a component.

Declaration

func rowSize(forComponent component: Int) -> CGSize

Parameters

component

A zero-indexed number identifying a component.

Return Value

The size of rows in the given component. This is generally the size required to display the largest string or view used as a row in the component.

Discussion

A picker view fetches the value of this property by calling the pickerView(_:widthForComponent:) and pickerView(_:rowHeightForComponent:) delegate methods, and caches it. The default value is (0, 0).

See Also

Getting the Dimensions of the View Picker

var numberOfComponents: Int

Gets the number of components for the picker view.

func numberOfRows(inComponent: Int) -> Int

Returns the number of rows for a component.