iPhone 的 DatePicker 替代选项
我需要通过单击按钮从日历中选择日期。
我尝试了 UIDatePicker
,但它占据了屏幕的主要部分。
我可以有其他方法来做到这一点吗?
提前致谢。
I need to select dates from a calender with a click of a button.
I tried UIDatePicker
, but it is occupying major part of screen.
Can I have any other way to do this?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一般推荐使用UIDatePicker。
我建议您将其链接到按钮/tableviewcell,按下该按钮/tableviewcell 时会显示带有 UIDatePicker 的操作表。当选择这种方式时,它很快就会占据屏幕的很大一部分。根据我的经验,没有其他办法可以解决这个问题。
It's generally recommended to use the UIDatePicker.
I would suggest you link it to a button/tableviewcell, which when pressed presents an actionsheet with the UIDatePicker. This way will shortly occupy a large part of the screen when it's selected. In my experience there is no other way around it.