Instance Method

numberOfRows(inComponent:)

Returns the number of rows for a component.

Declaration

func numberOfRows(inComponent component: Int) -> Int

Parameters

component

A zero-indexed number identifying a component.

Return Value

The number of rows in the given component.

Discussion

A picker view fetches the value of this property from the data source and and caches it. The default value is zero.

See Also

Getting the Dimensions of the View Picker

var numberOfComponents: Int

Gets the number of components for the picker view.

func rowSize(forComponent: Int) -> CGSize

Returns the size of a row for a component.