iPhone 的 DatePicker 替代选项

发布于 2024-12-20 04:21:56 字数 109 浏览 1 评论 0原文

我需要通过单击按钮从日历中选择日期。
我尝试了 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情仇皆在手 2024-12-27 04:21:56

一般推荐使用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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文