[英]UIImageView change animation left to right
How do perform a change animation to a UIImageView from left to right. 如何从左到右对UIImageView执行更改动画。 Here is the code I have so far, but this causes a weird flip animation, how can make it a smooth left to right animation like in facebook pitures. 这是我到目前为止的代码,但这会导致怪异的翻转动画,如何使其像Facebook pitures一样从左到右平滑播放。
UIImage toImage = new UIImage((string)ListOfImages[imageIndex]);
UIView.Transition(this.ImageView,
duration: 1.0,
options: UIViewAnimationOptions.TransitionFlipFromLeft,
animation: () => this.ImageView.Image = toImage,
completion: null);
from left to right do you mean you want to change the UIImageView
's position(Frame)? 从左到右,您是说要更改UIImageView
的position(Frame)吗? If so you can try UIView.Animate()
: 如果是这样,您可以尝试UIView.Animate()
:
UIView.Animate(1.0, () =>
{
this.ImageView.Frame = new CGRect(0, 300, 300, 300);
}, () =>
{
this.ImageView.Image = toImage;
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.