Showing
2 changed files
with
10 additions
and
11 deletions
| @@ -232,17 +232,14 @@ | @@ -232,17 +232,14 @@ | ||
| 232 | 232 | ||
| 233 | -(CABasicAnimation*)fadeAnimation | 233 | -(CABasicAnimation*)fadeAnimation |
| 234 | { | 234 | { |
| 235 | + CABasicAnimation* fadeAnimation = nil; | ||
| 235 | if (self.displayAnimated) { | 236 | if (self.displayAnimated) { |
| 236 | - CABasicAnimation* fadeAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"]; | 237 | + fadeAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"]; |
| 237 | fadeAnimation.fromValue = [NSNumber numberWithFloat:0.0]; | 238 | fadeAnimation.fromValue = [NSNumber numberWithFloat:0.0]; |
| 238 | fadeAnimation.toValue = [NSNumber numberWithFloat:1.0]; | 239 | fadeAnimation.toValue = [NSNumber numberWithFloat:1.0]; |
| 239 | fadeAnimation.duration = 2.0; | 240 | fadeAnimation.duration = 2.0; |
| 240 | - | ||
| 241 | - return fadeAnimation; | ||
| 242 | - } | ||
| 243 | - else { | ||
| 244 | - return nil; | ||
| 245 | } | 241 | } |
| 242 | + return fadeAnimation; | ||
| 246 | } | 243 | } |
| 247 | 244 | ||
| 248 | -(void)addAnimationIfNeededWithProgressLine:(UIBezierPath *)progressline | 245 | -(void)addAnimationIfNeededWithProgressLine:(UIBezierPath *)progressline |
| @@ -1041,11 +1041,13 @@ | @@ -1041,11 +1041,13 @@ | ||
| 1041 | 1041 | ||
| 1042 | -(CABasicAnimation*)fadeAnimation | 1042 | -(CABasicAnimation*)fadeAnimation |
| 1043 | { | 1043 | { |
| 1044 | - CABasicAnimation* fadeAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"]; | 1044 | + CABasicAnimation *fadeAnimation = nil; |
| 1045 | - fadeAnimation.fromValue = [NSNumber numberWithFloat:0.0]; | 1045 | + if (self.displayAnimated) { |
| 1046 | - fadeAnimation.toValue = [NSNumber numberWithFloat:1.0]; | 1046 | + fadeAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"]; |
| 1047 | - fadeAnimation.duration = 2.0; | 1047 | + fadeAnimation.fromValue = [NSNumber numberWithFloat:0.0]; |
| 1048 | - | 1048 | + fadeAnimation.toValue = [NSNumber numberWithFloat:1.0]; |
| 1049 | + fadeAnimation.duration = 2.0; | ||
| 1050 | + } | ||
| 1049 | return fadeAnimation; | 1051 | return fadeAnimation; |
| 1050 | } | 1052 | } |
| 1051 | 1053 |
-
Please register or login to post a comment