如何在 iPhone 中制作组合框
我正在尝试按照此链接在 ios 中创建一个组合框 http://www.codeproject.com /KB/iPhone/iphonecombobox.aspx。 但点击事件(显示选择器)似乎有时有效,有时无效。看起来有时它只在控件的某些区域起作用,而在其他区域则不起作用。
知道出了什么问题吗?
I am trying to make a combobox in ios following this link http://www.codeproject.com/KB/iPhone/iphonecombobox.aspx.
But the click event (that shows the picker) seems to work sometimes and sometimes not. It looks like sometimes it just works in some regions of the control and not others.
Any idea of what is wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这有点 hacky,但您可以在 ComboBox 区域周围添加隐藏的
UIControl
,然后将其连接到相同的IBAction
或void
现有的 ComboBox 使用的。例如,-(IBAction) showPicker
可能是您在该区域周围添加的新UIControl
的操作。It's kind of hacky, but you can add a hidden
UIControl
around the region of the ComboBox and then wire it up to the sameIBAction
orvoid
that the existing ComboBox uses. For example,-(IBAction) showPicker
could be the action of a newUIControl
that you add right around the region.由于某种原因,答案是直接在页面上使用文本字段和图像,而不是为控件创建视图并使用该视图 N 次。
For some reason, the answer was using the textfield and image directly to the page instead of creating a view for the control and using that view N times.
我为 iOS 创建了一个组合框 api,希望这可以有任何帮助: http:// www.chupamobile.com/products/details/365/ZComboBox/
I created a combobox api for iOS, hope this could be of any help: http://www.chupamobile.com/products/details/365/ZComboBox/