diff --git a/Source/AnimatableImageView.swift b/Source/AnimatableImageView.swift index 58cf250..500a8ac 100644 --- a/Source/AnimatableImageView.swift +++ b/Source/AnimatableImageView.swift @@ -15,6 +15,11 @@ public class AnimatableImageView: UIImageView { return !displayLink.paused } + /// A computed property that returns the total number of frames in the GIF. + public var frameCount: Int { + return animator?.frameCount ?? 0 + } + /// Prepares the frames using a GIF image file name, without starting the animation. /// The file name should include the `.gif` extension. ///