Link Search Menu Expand Document

PickerView

A view that shows one or more sets of values.

public class PickerView: View 

Inheritance

View

Initializers

init(frame:)

public init(frame: Rect = .zero) 

Properties

dataSource

The data source for the picker view.

public weak var dataSource: PickerViewDataSource?

delegate

The delegate for the picker view.

public weak var delegate: PickerViewDelegate?

numberOfComponents

Gets the number of components for the picker view.

public var numberOfComponents: Int 

Methods

numberOfRows(inComponent:)

Returns the number of rows for a component.

public func numberOfRows(inComponent component: Int) -> Int 

rowSize(forComponent:)

Returns the size of a row for a component.

public func rowSize(forComponent component: Int) -> Size 

reloadAllComponents()

Reloads all components of the picker view.

public func reloadAllComponents() 

reloadComponent(_:)

Reloads a particular component of the picker view.

public func reloadComponent(_ component: Int) 

selectRow(_:inComponent:animated:)

Selects a row ina specified component of the picker view.

public func selectRow(_ row: Int, inComponent component: Int, animated: Bool) 

selectedRow(inComponent:)

Returns the index of the selected row in a given component.

public func selectedRow(inComponent component: Int) -> Int 

view(forRow:forComponent:reusing:)

Returns the view used by the picker view for a given row and component.

public func view(forRow row: Int, forComponent component: Int,
                   reusing view: View?) -> View?