Browse files

Merge pull request #38 from dongminkim/master

property activityIndicatorViewColor added
  • Loading branch information...
2 parents c08ae5b + ae1737a commit fe9d4c91c17953421fe55d9d947be9a7ce93f22d @Sephiroth87 committed Oct 8, 2012
Showing with 16 additions and 0 deletions.
  1. +1 −0 ODRefreshControl/ODRefreshControl.h
  2. +15 −0 ODRefreshControl/ODRefreshControl.m
View
1 ODRefreshControl/ODRefreshControl.h
@@ -27,6 +27,7 @@
@property (nonatomic, readonly) BOOL refreshing;
@property (nonatomic, strong) UIColor *tintColor;
@property (nonatomic, assign) UIActivityIndicatorViewStyle activityIndicatorViewStyle;
+@property (nonatomic, strong) UIColor *activityIndicatorViewColor;
- (id)initInScrollView:(UIScrollView *)scrollView;
View
15 ODRefreshControl/ODRefreshControl.m
@@ -148,6 +148,21 @@ - (UIActivityIndicatorViewStyle)activityIndicatorViewStyle
return 0;
}
+- (void)setActivityIndicatorViewColor:(UIColor *)activityIndicatorViewColor
+{
+ if ([_activity isKindOfClass:[UIActivityIndicatorView class]]) {
+ [(UIActivityIndicatorView *)_activity setColor:activityIndicatorViewColor];
+ }
+}
+
+- (UIColor *)activityIndicatorViewColor
+{
+ if ([_activity isKindOfClass:[UIActivityIndicatorView class]]) {
+ return [(UIActivityIndicatorView *)_activity color];
+ }
+ return nil;
+}
+
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
if ([keyPath isEqualToString:@"contentInset"]) {

0 comments on commit fe9d4c9

Please sign in to comment.