下面代码段是关于ios View 淡入淡出效果的代码,希望能对各位也有好处。
- (void)TheAnimation{
animation.delegate = self;
animation.timingFunction = UIViewAnimationCurveEaseInOut;
NSUInteger f = [[rView subviews] indexOfObject:fView];
NSUInteger z = [[rView subviews] indexOfObject:zView];
[rView exchangeSubviewAtIndex:z withSubviewAtIndex:f];
[[rView layer] addAnimation:animation forKey:@"animation"];
}