Skip to content
Browse files

Customize the UIActivityIndicatorViewStyle

  • Loading branch information...
1 parent f69ce82 commit 3a86df8bc93f3b562f752ac4d23c2fcf6d986a50 @Sephiroth87 committed Jul 27, 2012
Showing with 11 additions and 0 deletions.
  1. +1 −0 ODRefreshControl/ODRefreshControl.h
  2. +10 −0 ODRefreshControl/ODRefreshControl.m
View
1 ODRefreshControl/ODRefreshControl.h
@@ -22,6 +22,7 @@
@property (nonatomic, readonly) BOOL refreshing;
@property (nonatomic, strong) UIColor *tintColor;
+@property (nonatomic, assign) UIActivityIndicatorViewStyle activityIndicatorViewStyle;
- (id)initInScrollView:(UIScrollView *)scrollView;
View
10 ODRefreshControl/ODRefreshControl.m
@@ -100,6 +100,16 @@ - (void)setTintColor:(UIColor *)tintColor
_shapeLayer.fillColor = [_tintColor CGColor];
}
+- (void)setActivityIndicatorViewStyle:(UIActivityIndicatorViewStyle)activityIndicatorViewStyle
+{
+ _activity.activityIndicatorViewStyle = activityIndicatorViewStyle;
+}
+
+- (UIActivityIndicatorViewStyle)activityIndicatorViewStyle
+{
+ return _activity.activityIndicatorViewStyle;
+}
+
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
CGFloat offset = [[change objectForKey:@"new"] CGPointValue].y;

1 comment on commit 3a86df8

@rzehan
rzehan commented on 3a86df8 Jul 27, 2012

awesome!

Please sign in to comment.
Something went wrong with that request. Please try again.