Skip to content

Commit 042cc8d

Browse files
committedNov 18, 2015
Version 0.1.4
1 parent aac44ec commit 042cc8d

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed
 

‎Pod/Classes/SCCatWaitingHUD.m

+20-7
Original file line numberDiff line numberDiff line change
@@ -331,21 +331,34 @@ - (CABasicAnimation *)rotationAnimation
331331
return rotationAnimation;
332332
}
333333

334-
- (CABasicAnimation *)scaleAnimation
334+
- (CAAnimationGroup *)scaleAnimation
335335
{
336336
// 眼皮和眼珠需要确定一个运动时间曲线
337337
CABasicAnimation *scaleAnimation;
338338
scaleAnimation = [CABasicAnimation animationWithKeyPath:@"transform"];
339339
scaleAnimation.fromValue = [NSValue valueWithCATransform3D:CATransform3DIdentity];
340-
scaleAnimation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeScale(1.0, 2.5, 1.0)];
341-
scaleAnimation.duration = self.animationDuration;
340+
scaleAnimation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeScale(1.0, 3.0, 1.0)];
341+
scaleAnimation.duration = self.animationDuration * 0.75f;
342342
scaleAnimation.cumulative = YES;
343-
scaleAnimation.repeatCount = HUGE_VALF;
343+
scaleAnimation.repeatCount = 1;
344344
scaleAnimation.removedOnCompletion= NO;
345345
scaleAnimation.fillMode=kCAFillModeForwards;
346-
scaleAnimation.autoreverses = YES;
347-
scaleAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
348-
return scaleAnimation;
346+
scaleAnimation.autoreverses = NO;
347+
scaleAnimation.timingFunction = [CAMediaTimingFunction functionWithControlPoints:0.2:0.0 :0.8 :1.0];
348+
scaleAnimation.speed = 1.0f;
349+
scaleAnimation.beginTime = self.animationDuration * 0.25f;
350+
351+
352+
CAAnimationGroup *group = [CAAnimationGroup animation];
353+
group.duration = self.animationDuration;
354+
group.repeatCount = HUGE_VALF;
355+
group.removedOnCompletion= NO;
356+
group.fillMode=kCAFillModeForwards;
357+
group.autoreverses = YES;
358+
group.timingFunction = [CAMediaTimingFunction functionWithControlPoints:0.2:0.0 :0.8 :1.0];
359+
360+
group.animations = [NSArray arrayWithObjects:scaleAnimation, nil];
361+
return group;
349362
}
350363

351364
@end

‎README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ else
3333
## BackLog
3434
* v0.1.0 Basic Version
3535
* v0.1.1 Add Landscape Orientation Support
36+
* v0.1.4 Add eye cover and Loading contentLabel animation
3637

3738
## Requirements
3839
iOS 8.0 Above
@@ -43,7 +44,7 @@ SCCatWaitingHUD is available through [CocoaPods](http://cocoapods.org). To insta
4344
it, simply add the following line to your Podfile:
4445

4546
```ruby
46-
pod 'SCCatWaitingHUD', '~> 0.1.1'
47+
pod 'SCCatWaitingHUD', '~> 0.1.4'
4748
```
4849

4950
## License

‎SCCatWaitingHUD.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = "SCCatWaitingHUD"
11-
s.version = "0.1.3"
11+
s.version = "0.1.4"
1212
s.summary = "Cute and simple waiting HUD indicator on iOS"
1313

1414
# This description is used to generate tags and improve search results.

0 commit comments

Comments
 (0)
Please sign in to comment.