如何使用 UIPickerView 制作 UItextField
我想做一些这样的思考 http://tinypic.com/r/33m8vmo/7 。我想知道它是否只是一个带有右侧图片的 UItextField? 我的第二个问题是为什么我的界面生成器中没有这个? http://tinypic.com/r/121txd5/7 我只有这个http://tinypic.com/r/34dgah0/7? 请帮助我,我是新手:(
i wanto to make somethink like this http://tinypic.com/r/33m8vmo/7 . I want to know if it's just a UItextField with a picture in the right or not ?
and my second question is why i don't have this in my interface builder ? http://tinypic.com/r/121txd5/7 i just have this http://tinypic.com/r/34dgah0/7 ?
Help me please , i'm a newbie :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
同样,它与这个非常接近。您必须将所需的视图(在该示例中,它是 UIDatePicker 实例)设置为文本字段的输入视图。看一下答案中的示例,您可以以类似的方式将 UIPickerView 实例建模为输入视图。
至于第二个问题,你想要的控件是Cocoa控件而不是Cocoa Touch控件。在针对 Mac 进行开发时,您将可以使用它们。
Again it is pretty close to this one. You will have to set the desired view (in that example, it was the
UIDatePicker
instance) as a text field's input view. Take a look at the example in the answer and you can modelUIPickerView
instance to be the input view in a similar fashion.As for the second question, the control you want is a Cocoa control and not a Cocoa Touch control. You will have them available when developing for mac.