Jelajahi Sumber

Fix convention

onevcat 9 tahun lalu
induk
melakukan
c9fcfbac76
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      Sources/ImageCache.swift

+ 3 - 3
Sources/ImageCache.swift

@@ -109,7 +109,7 @@ open class ImageCache {
     public typealias DiskCachePathClosure = (String?, String) -> String
     public typealias DiskCachePathClosure = (String?, String) -> String
     
     
     /// The default DiskCachePathClosure
     /// The default DiskCachePathClosure
-    public final class func DefaultDiskCachePathClosure(path: String?, cacheName: String) -> String {
+    public final class func defaultDiskCachePathClosure(path: String?, cacheName: String) -> String {
         let dstPath = path ?? NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true).first!
         let dstPath = path ?? NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true).first!
         return (dstPath as NSString).appendingPathComponent(cacheName)
         return (dstPath as NSString).appendingPathComponent(cacheName)
     }
     }
@@ -122,13 +122,13 @@ open class ImageCache {
     - parameter path: Optional - Location of cache path on disk. If `nil` is passed in (the default value),
     - parameter path: Optional - Location of cache path on disk. If `nil` is passed in (the default value),
                       the `.cachesDirectory` in of your app will be used.
                       the `.cachesDirectory` in of your app will be used.
     - parameter diskCachePathClosure: Closure that takes in an optional initial path string and generates
     - parameter diskCachePathClosure: Closure that takes in an optional initial path string and generates
-                      the final disk cache path.
+                      the final disk cache path. You could use it to fully customize your cache path.
     
     
     - returns: The cache object.
     - returns: The cache object.
     */
     */
     public init(name: String,
     public init(name: String,
                 path: String? = nil,
                 path: String? = nil,
-                diskCachePathClosure: DiskCachePathClosure = ImageCache.DefaultDiskCachePathClosure)
+                diskCachePathClosure: DiskCachePathClosure = ImageCache.defaultDiskCachePathClosure)
     {
     {
         
         
         if name.isEmpty {
         if name.isEmpty {