iPhone: UIImageView Fades in - Howto?

前端 未结 7 1103
礼貌的吻别
礼貌的吻别 2021-02-02 13:22

I have an UIImageView that I want to fade in.

Is there a way to enable that on an underlying UIViewController?

I have translated the s

7条回答
  •  情话喂你
    2021-02-02 13:33

    I would use UIView's +transitionWithView:duration:options:animations:completion: It is very efficient and powerful.

    [UIView transitionWithView:imgView duration:1 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{
        imgView.image = [UIImage imageNamed:@"MyImage"];
    } completion:nil];
    

提交回复
热议问题