From 02d35231acbf0d64d86fa44bfdc444d53354def5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B8=CC=86=20=D0=90?= =?UTF-8?q?=D1=88=D0=B0=D0=BD=D0=B8=D0=BD?= Date: Thu, 29 Sep 2016 17:56:46 +0300 Subject: [PATCH] cacheimage param naming fixed --- LeadKit/.DS_Store | Bin 6148 -> 6148 bytes .../Extensions/UIImage/UIImage+Loading.swift | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LeadKit/.DS_Store b/LeadKit/.DS_Store index 4048ccc14543e5957360688839c9f0c6ddf2bee4..c6f0f0f96b79a6f70826ef7b6c3225c4e3479510 100644 GIT binary patch delta 18 ZcmZoMXffE}$jDeYc^#wL<_yL;VgNe+1_J;9 delta 18 ZcmZoMXffE}$jEqn@;XMf%^8ey!~i~823Y_A diff --git a/LeadKit/LeadKit/Extensions/UIImage/UIImage+Loading.swift b/LeadKit/LeadKit/Extensions/UIImage/UIImage+Loading.swift index 6e54eb49..9d5cb82a 100644 --- a/LeadKit/LeadKit/Extensions/UIImage/UIImage+Loading.swift +++ b/LeadKit/LeadKit/Extensions/UIImage/UIImage+Loading.swift @@ -33,17 +33,17 @@ public extension UIImage { - parameter url: The image URL. - parameter placeholder: The placeholder image. - - parameter shouldCacheImage: Weather or not we should cache the NSURL response (default: true) + - parameter cacheImage: Weather or not we should cache the NSURL response (default: true) - parameter fetchComplete: Returns the image from the web the first time is fetched. - returns: A new image */ public class func imageFromURL(url: String, placeholder: UIImage, - shouldCacheImage: Bool = true, + cacheImage: Bool = true, fetchComplete: (image: UIImage?) -> ()) -> UIImage? { // From Cache - if shouldCacheImage { + if cacheImage { if let image = UIImage.sharedCache().objectForKey(url) as? UIImage { fetchComplete(image: nil) return image @@ -59,7 +59,7 @@ public extension UIImage { } } if let data = data, image = UIImage(data: data) { - if shouldCacheImage { + if cacheImage { UIImage.sharedCache().setObject(image, forKey: url) } dispatch_async(dispatch_get_main_queue()) {