Przeglądaj źródła

Remove the indicatorWidth property. Use can use the indicatorView to directly modify the frame or constraint

DreamPiggy 8 lat temu
rodzic
commit
d28870cd52

+ 1 - 5
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

+ 0 - 10
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