我能够成功淡出我的图像。当我尝试将其淡入时,它不会“淡入”......它只是突然回来。我究竟做错了什么?这是我将其淡出并尝试将其淡入的代码:
淡出:
//Fade Out
Image.hidden = NO;
[UIView animateWithDuration:0.5 delay:1.0 options: UIViewAnimationOptionCurveEaseOut animations:^ {Image.alpha = 0;}
completion:^(BOOL finished){Image.hidden = YES;}];
这就是我用来尝试将其淡入的方法;基本上,我正在做相反的事情......为什么它不起作用?
//Fade In
Image.hidden = YES;
[UIView animateWithDuration:0.5 delay:1.0 options: UIViewAnimationOptionCurveEaseIn animations:^ {Image.alpha = 1;}
completion:^(BOOL finished){Image.hidden = NO;}];