Skip to content

Commit 2716a01

Browse files
committed
Merge branch 'master' of https://github.com/runeb/MBProgressHUD into runeb-master
2 parents e368a8c + 1f1aa50 commit 2716a01

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

MBProgressHUD.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,13 @@ typedef void (^MBProgressHUDCompletionBlock)();
433433
*/
434434
@property (assign, getter = isSquare) BOOL square;
435435

436+
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 50000
437+
/**
438+
* The color of the activity indicator. Defaults to [UIColor whiteColor]
439+
*/
440+
@property() UIColor *activityIndicatorColor;
441+
#endif
442+
436443
@end
437444

438445

MBProgressHUD.m

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ @implementation MBProgressHUD
106106
@synthesize detailsLabelText;
107107
@synthesize progress;
108108
@synthesize size;
109+
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 50000
110+
@dynamic activityIndicatorColor;
111+
#endif
109112
#if NS_BLOCKS_AVAILABLE
110113
@synthesize completionBlock;
111114
#endif
@@ -474,6 +477,23 @@ - (void)setupLabels {
474477
[self addSubview:detailsLabel];
475478
}
476479

480+
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 50000
481+
-(void)setActivityIndicatorColor:(UIColor *)activityIndicatorColor
482+
{
483+
if(self.indicator && [indicator isKindOfClass:[UIActivityIndicatorView class]]) {
484+
((UIActivityIndicatorView*)self.indicator).color = activityIndicatorColor;
485+
}
486+
}
487+
488+
-(UIColor*)activityIndicatorColor
489+
{
490+
if(self.indicator && [indicator isKindOfClass:[UIActivityIndicatorView class]]) {
491+
return ((UIActivityIndicatorView*)self.indicator).color;
492+
}
493+
return nil;
494+
}
495+
#endif
496+
477497
- (void)updateIndicators {
478498

479499
BOOL isActivityIndicator = [indicator isKindOfClass:[UIActivityIndicatorView class]];

0 commit comments

Comments
 (0)