Create UIPickerView programmatically
The UIPickerView is one of the input controls in iOS for displaying and selecting a list of data. Most tutorials implement this control in Interface Builder, which is fine, but I like to have more control and do most everything in code. There are several components to doing this 100% programmatically, which I will demonstrate below...
The first thing we have to do is include the UIPickerViewDelegate in the interface of our class .h file.
The first thing we have to do is include the UIPickerViewDelegate in the interface of our class .h file.
@interface myViewController : UIViewController<UIPickerViewDelegate>Read more »
Labels: programmatically, UIPickerView, UIPickerViewDelegate