首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >uiimage动画效果

uiimage动画效果
EN

Stack Overflow用户
提问于 2011-01-27 19:27:31
回答 2查看 684关注 0票数 0

我正在尝试让UIImage具有轻微的上下浮动效果。

代码语言:javascript
运行
复制
[UIView setAnimationDelegate:self];
            [UIView setAnimationDidStopSelector:@selector(endSwipeAnimation)];
            [UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
            [UIView setAnimationRepeatCount:10];
            [myImage setAlpha:1.0];
            [myImage setAlpha:0.7];

            [UIView setAnimationRepeatAutoreverses:NO];

          [UIView commitAnimations];

有什么办法可以做到这一点吗?

提前感谢

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2011-01-27 19:35:16

代码语言:javascript
运行
复制
[UIView beginAnimations:animationID context:context];
[UIView setAnimationDuration:duration];

失踪了..。?

票数 0
EN

Stack Overflow用户

发布于 2012-11-28 20:31:02

在动画之间写下你想要的新效果或改变。

首先将imageView alpha值设置为1,然后将其alpha值更改为0.5或您希望在动画中使用的任何值。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4815725

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档