简体   繁体   中英

how to display uipickerview with Button programmatically in iphone

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM