Răsfoiți Sursa

Added some comments.

jacobmao0416 8 ani în urmă
părinte
comite
847007f89f
1 a modificat fișierele cu 8 adăugiri și 0 ștergeri
  1. 8 0
      Sources/AnimatedImageView.swift

+ 8 - 0
Sources/AnimatedImageView.swift

@@ -34,7 +34,13 @@
 import UIKit
 import UIKit
 import ImageIO
 import ImageIO
 
 
+/// Protocol of `AnimatedImageView`.
 public protocol AnimatedImageViewDelegate: class {
 public protocol AnimatedImageViewDelegate: class {
+    /**
+     Called after the animatedImageView has reached the max repeat count.
+
+     - parameter imageView: The animatedImageView that is being animated.
+     */
     func didFinishAnimate(for imageView: AnimatedImageView)
     func didFinishAnimate(for imageView: AnimatedImageView)
 }
 }
 
 
@@ -103,6 +109,7 @@ open class AnimatedImageView: UIImageView {
         }
         }
     }
     }
 
 
+    /// The repeat count.
     public var repeatCount = RepeatCount.infinite {
     public var repeatCount = RepeatCount.infinite {
         didSet {
         didSet {
             if oldValue != repeatCount {
             if oldValue != repeatCount {
@@ -113,6 +120,7 @@ open class AnimatedImageView: UIImageView {
         }
         }
     }
     }
 
 
+    /// A delegate to be called after reach max repeat count.
     public var delegate: AnimatedImageViewDelegate?
     public var delegate: AnimatedImageViewDelegate?
     
     
     // MARK: - Private property
     // MARK: - Private property