开发者

Animate or Move image from right to left

开发者 https://www.devze.com 2023-03-06 16:03 出处:网络
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.

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 +UIViewAni开发者_Python百科mationOptionCurveLinear
animations:^{imageView.frame = CGRectMake(x, 0, 12000, 768); 
}
completion:nil];

Please help me out. Thanks.


Change the X-Coordinate of your image view frame.

Use below

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号