Reputation: 302
does anyone know how to add a UIPickerViewDataSource and a UIPickerViewDelegate to the class of TableViewController
class AddProductTableViewController: UITableViewController, UIPickerViewDataSource, UIPickerViewDelegate
because when I do it like that it keeps giving me an error of type 'AddProductTableViewController' does not conform to protocol 'UIPickerViewDataSource' it gives me the same error for the UIPickerViewDelegate
Upvotes: 0
Views: 103
Reputation: 395
You need to implement all the required methods of UIPickerViewDataSource
and UIPickerViewDelegate
, if you want to conform to these protocols.
- numberOfComponentsInPickerView:
- pickerView:numberOfRowsInComponent:
...
Upvotes: 2