File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 ]];
You can’t perform that action at this time.
0 commit comments