The delegate of a UIPicker
object must adopt this protocol and implement at least some of its methods to provide the picker view with the data it needs to construct itself.
SDKs
- iOS 2.0+
- Mac Catalyst 13.0+
Framework
- UIKit
Declaration
protocol UIPickerViewDelegate
Overview
The delegate implements the required methods of this protocol to return height, width, row title, and the view content for the rows in each component. It must also provide the content for each component’s row, either as a string or a view. Typically the delegate implements other optional methods to respond to new selections or deselections of component rows.
See UIPicker
for a discussion of components, rows, row content, and row selection.