Skip to content

Commit

Permalink
Merge pull request samvermette#143 from bdbergeron/master
Browse files Browse the repository at this point in the history
Add support for setting UIActivityIndicatorView color (iOS 5+)
  • Loading branch information
samvermette committed Sep 26, 2013
2 parents 5b98a05 + 0116cbc commit 70496a5
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
Original file line number Diff line number Diff line change
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, readwrite) UIColor *activityIndicatorViewColor NS_AVAILABLE_IOS(5_0);
@property (nonatomic, readwrite) UIActivityIndicatorViewStyle activityIndicatorViewStyle;

@property (nonatomic, readonly) SVPullToRefreshState state;
Expand Down
10 changes: 9 additions & 1 deletion SVPullToRefresh/UIScrollView+SVPullToRefresh.m
Original file line number Diff line number Diff line change
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 70496a5

Please sign in to comment.