选择器视图作为子视图 [英] Picker view as subview

查看:33
本文介绍了选择器视图作为子视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发一个应用程序,我一直在使用pickerview.我有一个按钮 n 我的视图 n 当我单击该按钮时,我希望选择器视图显示为子视图,但我无法执行此操作.我还想从选择器视图中选择一个值并将其存储在某处以用于进一步操作.任何人请帮忙.........

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..........

推荐答案

以编程方式创建 UipickerView 并使用

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

cgrectmake 并委托给 self 比您可以从选择器中选择值.

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

在需要时隐藏或删除子视图之后.将其定义为 IBOUTLET 以供进一步

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

参考

这篇关于选择器视图作为子视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆