繁体   English   中英

UIImageView从左到右更改动画

[英]UIImageView change animation left to right

如何从左到右对UIImageView执行更改动画。 这是我到目前为止的代码,但这会导致怪异的翻转动画,如何使其像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);

从左到右,您是说要更改UIImageView的position(Frame)吗? 如果是这样,您可以尝试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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM