Skip to content

Commit

Permalink
Added support for setting the color of the UIActivityIndicatorView.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdbergeron committed Aug 20, 2013
1 parent 5b98a05 commit 790fe10
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions SVPullToRefresh/UIScrollView+SVPullToRefresh.h
Expand Up @@ -47,6 +47,7 @@ typedef NSUInteger SVPullToRefreshState;
@property (nonatomic, strong) UIColor *textColor;
@property (nonatomic, strong, readonly) UILabel *titleLabel;
@property (nonatomic, strong, readonly) UILabel *subtitleLabel;
@property (nonatomic, strong) UIColor *activityIndicatorViewColor;
@property (nonatomic, readwrite) UIActivityIndicatorViewStyle activityIndicatorViewStyle;

@property (nonatomic, readonly) SVPullToRefreshState state;
Expand Down
10 changes: 9 additions & 1 deletion SVPullToRefresh/UIScrollView+SVPullToRefresh.m
Expand Up @@ -157,7 +157,7 @@ - (BOOL)showsPullToRefresh {
@implementation SVPullToRefreshView

// public properties
@synthesize pullToRefreshActionHandler, arrowColor, textColor, activityIndicatorViewStyle, lastUpdatedDate, dateFormatter;
@synthesize pullToRefreshActionHandler, arrowColor, textColor, activityIndicatorViewColor, activityIndicatorViewStyle, lastUpdatedDate, dateFormatter;

@synthesize state = _state;
@synthesize scrollView = _scrollView;
Expand Down Expand Up @@ -494,6 +494,10 @@ - (UIColor *)textColor {
return self.titleLabel.textColor;
}

- (UIColor *)activityIndicatorViewColor {
return self.activityIndicatorView.color;
}

- (UIActivityIndicatorViewStyle)activityIndicatorViewStyle {
return self.activityIndicatorView.activityIndicatorViewStyle;
}
Expand Down Expand Up @@ -549,6 +553,10 @@ - (void)setTextColor:(UIColor *)newTextColor {
self.subtitleLabel.textColor = newTextColor;
}

- (void)setActivityIndicatorViewColor:(UIColor *)color {
self.activityIndicatorView.color = color;
}

- (void)setActivityIndicatorViewStyle:(UIActivityIndicatorViewStyle)viewStyle {
self.activityIndicatorView.activityIndicatorViewStyle = viewStyle;
}
Expand Down

0 comments on commit 790fe10

Please sign in to comment.