Skip to content

Commit

Permalink
open load method
Browse files Browse the repository at this point in the history
  • Loading branch information
bhlvoong committed Nov 23, 2016
1 parent 0240b3f commit 1d304e6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions LBTAComponents/Classes/CachedImageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ open class CachedImageView: UIImageView {

static let imageCache = NSCache<NSString, UIImage>()

var urlStringForChecking: String?
var shouldUseEmptyImage = true
var emptyImage: UIImage?
open var shouldUseEmptyImage = true

private var urlStringForChecking: String?
private var emptyImage: UIImage?

public init(_ cornerRadius: CGFloat = 0, emptyImage: UIImage? = nil) {
super.init(frame: .zero)
Expand All @@ -28,7 +29,7 @@ open class CachedImageView: UIImageView {
fatalError("init(coder:) has not been implemented")
}

func loadImageForUrlString(_ urlString: String, completion: (() -> ())? = nil) {
open func loadImageForUrlString(_ urlString: String, completion: (() -> ())? = nil) {
image = nil

self.urlStringForChecking = urlString
Expand Down

0 comments on commit 1d304e6

Please sign in to comment.