Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法将 UIDatepicker 设置为分钟和秒而不是小时和分钟
编辑我最终添加了自己的 UIPicker 类,并自己创建了值和标签。
我认为 SDK 中没有任何内置方法可以做到这一点。尝试只继承 UIPickerView,你应该得到基本相同的结果。
如果您搜索 UICatalog 的帮助,它有完整的选择器示例以及如何制作您自己的自定义选择器。
根据 API 文档,没有显示分秒的选项。