Skip to content

Commit

Permalink
fix for tintColor property bug.
Browse files Browse the repository at this point in the history
fix  #3
  • Loading branch information
xhzengAIB committed Jun 17, 2014
1 parent 2e0330e commit a82a9d0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions RefreshControl/XHActivityIndicatorView.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ @interface XHActivityIndicatorView ()
@property (nonatomic, strong) CALayer *animationLayer;

@property (nonatomic, strong) NSMutableArray *standbyLayersArray;
@property (nonatomic, strong) NSMutableArray *animationLayerArray;

@property (nonatomic, assign) BOOL isRotating;

Expand All @@ -25,6 +26,7 @@ @implementation XHActivityIndicatorView

- (void)setup {
self.standbyLayersArray = [[NSMutableArray alloc] init];
self.animationLayerArray = [[NSMutableArray alloc] init];

self.isRotating = NO;

Expand Down Expand Up @@ -63,6 +65,10 @@ - (void)setTintColor:(UIColor *)tintColor {
for (CALayer *layer in self.standbyLayersArray) {
layer.backgroundColor = tintColor.CGColor;
}

for (CALayer *layer in self.animationLayerArray) {
layer.backgroundColor = tintColor.CGColor;
}
}

- (void)setTimeOffset:(CGFloat)timeOffset {
Expand Down Expand Up @@ -127,6 +133,8 @@ - (void)createAnimationLayers {
[layer addAnimation:animation forKey:[NSString stringWithFormat:@"key %d", i]];

[self.animationLayer addSublayer:layer];

[self.animationLayerArray addObject:layer];
}
}

Expand Down

0 comments on commit a82a9d0

Please sign in to comment.