I'm a IOS noob and I'm trying to understand how to set the datasource of of the uipicker view
i have followed This tutorial, everything seems to work correctly however i get a warning in xcode that says
'id<UIPickerViewDataSource>' from incompatible type 'StateViewController *const __strong'
it occurs on this line.
myPickerView.delegate = self;
I keep trying different things but they all lead me in the same direction. It fails.
How should i be doing this? how to i properly set the datasource of a UIpicker view.
Thanks in advance for your guidance.
rdelmar :
You just need to tell the compiler that you're going to conform to the delegate protocol. You do that by adding <UIPickerViewDataSource> to your .h file,\n\n@interface StateViewController : UIViewController <UIPickerViewDataSource>\n",
2014-05-03T01:12:52
Zia :
You need to say \n\nmyPickerView.dataSource = self\n\n\nand also\n\n<UIPickerViewDataSource>\n",
2014-05-03T01:36:00