ref1view.hidden = NO;
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.25f];
[ref1view setAlpha:([ref1view alpha] == 1.0f) ? 0.0f : 1.0f];
[UIView commitAnimations];
有人可以给我解释一下这个是怎么工作的吗?特别是这一行:
[ref1view setAlpha:([ref1view alpha] == 1.0f) ? 0.0f : 1.0f];
看起来这个函数会将透明度从0到1再从1到0进行动画,但我不理解语法。 谢谢!