diff --git a/SDWebImage/Core/SDAnimatedImageView.h b/SDWebImage/Core/SDAnimatedImageView.h index ce45341a..2b061032 100644 --- a/SDWebImage/Core/SDAnimatedImageView.h +++ b/SDWebImage/Core/SDAnimatedImageView.h @@ -21,9 +21,11 @@ */ @interface SDAnimatedImageView : UIImageView /** - The animation player. + The internal animation player. + This property is only used for advanced usage, like inspecting/debugging animation status, control progressive loading, complicated animation frame index control, etc. + @warning Pay attention if you directly update the player's property like `totalFrameCount`, `totalLoopCount`, the same property on `SDAnimatedImageView` may not get synced. */ -@property (nonatomic, strong, nonnull) SDAnimatedImagePlayer *player; +@property (nonatomic, strong, readonly, nullable) SDAnimatedImagePlayer *player; /** Current display frame image. This value is KVO Compliance. diff --git a/SDWebImage/Core/SDAnimatedImageView.m b/SDWebImage/Core/SDAnimatedImageView.m index 3ab4b212..bdc3fa0c 100644 --- a/SDWebImage/Core/SDAnimatedImageView.m +++ b/SDWebImage/Core/SDAnimatedImageView.m @@ -26,6 +26,7 @@ SDAnimatedImagePlaybackMode _playbackMode; } +@property (nonatomic, strong, readwrite) SDAnimatedImagePlayer *player; @property (nonatomic, strong, readwrite) UIImage *currentFrame; @property (nonatomic, assign, readwrite) NSUInteger currentFrameIndex; @property (nonatomic, assign, readwrite) NSUInteger currentLoopCount;