user8196879
user8196879

Reputation:

Value of type 'UIImageView' has no member 'loadImageUsingCacheWithUrlString'

Why do I keep getting the error "Value of type 'UIImageView' has no member 'loadImageUsingCacheWithUrlString'" for the line:

self.profileImageView.loadImageUsingCacheWithUrlString(profileImageUrl)

fileprivate func setupNameAndProfileImage() {

    if let id = message?.chatPartnerId() {
        let ref = Database.database().reference().child("users").child(id)
        ref.observeSingleEvent(of: .value, with: { (snapshot) in

            if let dictionary = snapshot.value as? [String: AnyObject] {
                self.textLabel?.text = dictionary["name"] as? String

                if let profileImageUrl = dictionary["profileImageUrl"] as? String {
                    self.profileImageView.loadImageUsingCacheWithUrlString(profileImageUrl)

Value of type 'UIImageView' has no member 'loadImageUsingCacheWithUrlString'

Upvotes: 0

Views: 477

Answers (1)

matt
matt

Reputation: 535222

As far as I can guess, loadImageUsingCacheWithUrlString is a method from this code:

https://github.com/mustafaysil/ImageCacheSwift/blob/master/ImageCache.swift

Evidently, that code is not in your project.

Upvotes: 2

Related Questions