从右向左动画或移动图像 [英] Animate or Move image from right to left

查看:65
本文介绍了从右向左动画或移动图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写此代码以将图像从左向右移动,并且工作正常. 但是,现在我想从右到左执行此操作.

I am writing this code to move image left to right, and it working fine. But, now I want to do this from right to left.

[UIView animateWithDuration:20.0
delay:0.0
options: UIViewAnimationOptionAllowUserInteraction + UIViewAnimationOptionRepeat +UIViewAnimationOptionCurveLinear
animations:^{imageView.frame = CGRectMake(x, 0, 12000, 768); 
}
completion:nil];

请帮帮我. 谢谢.

推荐答案

更改图像视图框架的 X坐标.

在下面使用

[UIView animateWithDuration:20.0
delay:0.0
options: UIViewAnimationOptionAllowUserInteraction + UIViewAnimationOptionRepeat +UIViewAnimationOptionCurveLinear
animations:^{imageView.frame = CGRectMake(0, 0, 12000, 768); 
}
completion:nil];

这篇关于从右向左动画或移动图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆