Browse Source

Merge pull request #983 from zhongwuzw/class-to-anyobject

Replace class-only protocol keyword with AnyObject
Wei Wang 7 years ago
parent
commit
efa41c7767
2 changed files with 4 additions and 4 deletions
  1. 2 2
      Sources/AnimatedImageView.swift
  2. 2 2
      Sources/ImageDownloader.swift

+ 2 - 2
Sources/AnimatedImageView.swift

@@ -35,7 +35,7 @@ import UIKit
 import ImageIO
 
 /// Protocol of `AnimatedImageView`.
-public protocol AnimatedImageViewDelegate: class {
+public protocol AnimatedImageViewDelegate: AnyObject {
     /**
      Called after the animatedImageView has finished each animation loop.
 
@@ -292,7 +292,7 @@ struct AnimatedFrame {
     static let null: AnimatedFrame = AnimatedFrame(image: .none, duration: 0.0)
 }
 
-protocol AnimatorDelegate: class {
+protocol AnimatorDelegate: AnyObject {
     func animator(_ animator: Animator, didPlayAnimationLoops count: UInt)
 }
 

+ 2 - 2
Sources/ImageDownloader.swift

@@ -97,7 +97,7 @@ public enum KingfisherError: Int {
 public let KingfisherErrorStatusCodeKey = "statusCode"
 
 /// Protocol of `ImageDownloader`.
-public protocol ImageDownloaderDelegate: class {
+public protocol ImageDownloaderDelegate: AnyObject {
     /**
      Called when the `ImageDownloader` object will start downloading an image from specified URL.
      
@@ -175,7 +175,7 @@ extension ImageDownloaderDelegate {
 }
 
 /// Protocol indicates that an authentication challenge could be handled.
-public protocol AuthenticationChallengeResponsable: class {
+public protocol AuthenticationChallengeResponsable: AnyObject {
     /**
      Called when an session level authentication challenge is received.
      This method provide a chance to handle and response to the authentication challenge before downloading could start.