Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

property activityIndicatorViewColor added #38

Merged
merged 1 commit into from

2 participants

@dongminkim

I need a custom color on UIActivityIndicatorView, so I added the property.

@Sephiroth87 Sephiroth87 merged commit fe9d4c9 into from
@Sephiroth87
Owner

Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 6, 2012
  1. @dongminkim
This page is out of date. Refresh to see the latest.
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"]) {
Something went wrong with that request. Please try again.