SwiftGif icon indicating copy to clipboard operation
SwiftGif copied to clipboard

Unknown class GIFImageView in Interface Builder file.

Open dxshindeo opened this issue 5 years ago • 1 comments

So in storyboard I have an imageView, did set its class as "GIFImageView". When running app, the error in title is displayed.

Library installed as pod pod 'SwiftGifOrigin', '~> 1.7.0'

I also did a global search in the project Pods folder, and there are no results for a word "GIFImageView" - the class is not found in the library.

This is what I see:

Screenshot 2019-12-30 at 17 37 28

dxshindeo avatar Dec 30 '19 15:12 dxshindeo

Hi, I'm not the library's owner, but in my case I created this simple @IBDesignable class as below

import UIKit
import SwiftGifOrigin

@IBDesignable class GifImageView: UIImageView {

    @IBInspectable var imageGif: String = "" {
        didSet {
            sharedInit()
        }
    }

    private func sharedInit() {
        if !imageGif.isEmpty {
            self.loadGif(name: imageGif)
        }
    }
}

oscarito9410 avatar May 16 '20 05:05 oscarito9410