Picker view as subview

2019-09-19 10:16发布

问题:

i m currently working on an application and i m stuck up with the pickerview. i have a button n my view n when i click on that button i want a pickerview to appear as a sub view but i m unable to do this. i also want to select a value from the picker view and store it somewhere to use it for further actions. anyone please help..........

回答1:

Create UipickerView programatically and add it as a subview with required height using

cgrectmake and delegate to self than you can select values from picker .

Afte that hide or remove subview when required.Define it as IBOUTLET for any further

referance