如何在 UIPicker 的选择栏上设置文本
我想在 UIPicker 的选择栏上设置“MINS”和“SECS”文本,如下图所示。我该怎么做?
I want to set text of "MINS" and "SECS" on the UIPicker's selection bar as shown in the following image. How can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些技巧可能对您有用:
如何在 uipickerview 的选择指示器上写入文本 和修复了选区中的标签UIPickerView 的栏
它只是简单地在 UIPickerView 上添加一个带有文本的 UILabel 。您只需要找到正确的坐标即可很好地放置文本。
These tricks might be useful to you:
how to write text on selection indicator of uipickerview and Fixed labels in the selection bar of a UIPickerView
Its just simply adding a UILabel with your text over the UIPickerView. You only need to find the right coordinates so text will be placed well.