Reputation: 437
I'm doing application in that I added pickerview with button without using IB (Interface Builder).
Here I added pickerview and button programmatically in iphone.
But when I run this application in pickerview I added some names that was not showing.
It was showing only empty pickerview and when I click button the pickerview displayed in top of the view not in down.
How to add pickerview with button programmatically in iphone?
How to code this button with pickerview without using IB?
Upvotes: 2
Views: 1087
Reputation: 10011
Did you implement the datasource and delegate methods for UIPickerView.
Of course you can programmatically add pickerView and button, you just need to make a frame using CGRectMake and giving coordinates where you want to show your picker and button.
post some code of what you used to display data in picker
Upvotes: 1