I am tryign to add a PickerView – But I see a black screen… What am I doing wrong???
UIPickerView *myPickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0, 0, 320, 320)];
[self.view addSubview:myPickerView];
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Implement the UIPickerViewDataSource methods:
and the UIPickerViewDelegate method:
Don’t forget to set the properties:
And in the .h file, remember to put:
I usually use an
NSMutableArrayfilled with strings in order to fill in the data. Hope that helps!