From 05c6e5d70ef8cce9d0ceb9c752515b4391b52f36 Mon Sep 17 00:00:00 2001 From: Insomnia Date: Tue, 3 Nov 2020 09:40:08 +0800 Subject: [PATCH] mod: change description of animated player --- SDWebImage/Core/SDAnimatedImageView.h | 6 ++++-- SDWebImage/Core/SDAnimatedImageView.m | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) 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;