From d28870cd5202ce54eb4508e16decfb709a7d0ca3 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Sun, 4 Feb 2018 15:11:35 +0800 Subject: [PATCH] Remove the indicatorWidth property. Use can use the indicatorView to directly modify the frame or constraint --- SDWebImage/SDWebImageIndicator.h | 6 +----- SDWebImage/SDWebImageIndicator.m | 10 ---------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/SDWebImage/SDWebImageIndicator.h b/SDWebImage/SDWebImageIndicator.h index 4078ab95..df1cf969 100644 --- a/SDWebImage/SDWebImageIndicator.h +++ b/SDWebImage/SDWebImageIndicator.h @@ -87,14 +87,10 @@ #else @property (nonatomic, strong, readonly, nonnull) NSProgressIndicator *indicatorView; #endif -/** - The preferred width for progress indicator. The getter and setter just pass to the indicatorView's frame. The default value is `UIProgressView`'s natural width. - */ -@property (nonatomic, assign) CGFloat indicatorWidth; @end -// Convenience way to use progress indicator. Remember to set the indicatorWidth +// Convenience way to create progress indicator. Remember to specify the indicator width or use layout constraint if need. @interface SDWebImageProgressIndicator (Conveniences) /// default-style progress indicator diff --git a/SDWebImage/SDWebImageIndicator.m b/SDWebImage/SDWebImageIndicator.m index 9aa06b56..ba34e61f 100644 --- a/SDWebImage/SDWebImageIndicator.m +++ b/SDWebImage/SDWebImageIndicator.m @@ -161,16 +161,6 @@ } #endif -- (CGFloat)indicatorWidth { - return self.indicatorView.frame.size.width; -} - -- (void)setIndicatorWidth:(CGFloat)indicatorWidth { - CGRect frame = self.indicatorView.frame; - frame.size.width = indicatorWidth; - self.indicatorView.frame = frame; -} - - (void)startAnimatingIndicator { self.indicatorView.hidden = NO; #if SD_UIKIT