Skip to content

Commit 2f11106

Browse files
committed
Migrated some property overrides to KVO on MBRoundProgressView.
1 parent 64a3f8a commit 2f11106

File tree

1 file changed

+2
-30
lines changed

1 file changed

+2
-30
lines changed

MBProgressHUD.m

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -738,35 +738,7 @@ - (void)setTransformForCurrentOrientation:(BOOL)animated {
738738
@end
739739

740740

741-
@implementation MBRoundProgressView {
742-
float _progress;
743-
BOOL _annular;
744-
}
745-
746-
#pragma mark - Properties
747-
748-
@synthesize progressTintColor = _progressTintColor;
749-
@synthesize backgroundTintColor = _backgroundTintColor;
750-
751-
#pragma mark - Accessors
752-
753-
- (float)progress {
754-
return _progress;
755-
}
756-
757-
- (void)setProgress:(float)progress {
758-
_progress = progress;
759-
[self setNeedsDisplay];
760-
}
761-
762-
- (BOOL)isAnnular {
763-
return _annular;
764-
}
765-
766-
- (void)setAnnular:(BOOL)annular {
767-
_annular = annular;
768-
[self setNeedsDisplay];
769-
}
741+
@implementation MBRoundProgressView
770742

771743
#pragma mark - Lifecycle
772744

@@ -861,7 +833,7 @@ - (void)unregisterFromKVO {
861833
}
862834

863835
- (NSArray *)observableKeypaths {
864-
return [NSArray arrayWithObjects:@"progressTintColor", @"backgroundTintColor", nil];
836+
return [NSArray arrayWithObjects:@"progressTintColor", @"backgroundTintColor", @"progress", @"annular", nil];
865837
}
866838

867839
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {

0 commit comments

Comments
 (0)