Sfoglia il codice sorgente

1.Update the style of selector in "ImageCache.swift"
2.Update a method name in "String+MD5.swift"

Smartech 10 anni fa
parent
commit
574ef5b9a8
2 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 3 3
      Sources/ImageCache.swift
  2. 1 1
      Sources/String+MD5.swift

+ 3 - 3
Sources/ImageCache.swift

@@ -130,9 +130,9 @@ public class ImageCache {
         })
         
 #if !os(OSX) && !os(watchOS)
-        NSNotificationCenter.defaultCenter().addObserver(self, selector: "clearMemoryCache", name: UIApplicationDidReceiveMemoryWarningNotification, object: nil)
-        NSNotificationCenter.defaultCenter().addObserver(self, selector: "cleanExpiredDiskCache", name: UIApplicationWillTerminateNotification, object: nil)
-        NSNotificationCenter.defaultCenter().addObserver(self, selector: "backgroundCleanExpiredDiskCache", name: UIApplicationDidEnterBackgroundNotification, object: nil)
+        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(ImageCache.clearMemoryCache), name: UIApplicationDidReceiveMemoryWarningNotification, object: nil)
+        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(ImageCache.cleanExpiredDiskCache), name: UIApplicationWillTerminateNotification, object: nil)
+        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(ImageCache.backgroundCleanExpiredDiskCache), name: UIApplicationDidEnterBackgroundNotification, object: nil)
 #endif
     }
     

+ 1 - 1
Sources/String+MD5.swift

@@ -112,7 +112,7 @@ private func CS_AnyGenerator<Element>(body: () -> Element?) -> AnyGenerator<Elem
     #if os(Linux)
         return AnyGenerator(body: body)
     #else
-        return anyGenerator(body)
+        return AnyGenerator(body: body)
     #endif
 }