动画日期选择器。有可能吗?

发布于 2025-01-06 09:03:27 字数 153 浏览 3 评论 0原文

我想为 DatePicker 的入口设置动画。

现在,我显示并删除具有此属性的对象:

datePicker.hidden=YES or
datePicker.hidden=NO

如何像视图一样为对象设置动画?

I would like to animate the entrance of a DatePicker.

Now, I show and remove the object whit this property:

datePicker.hidden=YES or
datePicker.hidden=NO

How can I animate the object like a View?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

半世晨晓 2025-01-13 09:03:27

看看块动画。

datePicker.alpha = 0.0f;
datePicker.hidden = NO;

[UIView animateWithDuration:0.5f animations:^{
    datePicker.alpha = 1.0f;
} completion:^(BOOL finished){}];

Have a look at block animations.

datePicker.alpha = 0.0f;
datePicker.hidden = NO;

[UIView animateWithDuration:0.5f animations:^{
    datePicker.alpha = 1.0f;
} completion:^(BOOL finished){}];
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文