         return scrollImg.zoomScale != scrollImg.minimumZoomScale
     }
     
+    required public init?(coder aDecoder: NSCoder) {
+        super.init(coder: aDecoder)
+        setup()
+    }
+    
+    override public init(frame: CGRect) {
+        super.init(frame: frame)
+        setup()
+    }
+    
 }
 
 extension GTZoomableImageView: UIScrollViewDelegate {

        clipsToBounds = true
        isUserInteractionEnabled = true
        
        imageView.isUserInteractionEnabled = true
        imageView.clipsToBounds = false
        imageView.image = image

    @IBInspectable public var image: UIImage? {
        didSet {
            imageView.image = image
            setup()
        }
    }
    
    @IBInspectable public var minimumZoomScale: CGFloat = 1.0
    @IBInspectable public var maximumZoomScale: CGFloat = 3.0
    
    internal let imageView = UIImageView()
    private let scrollImg = UIScrollView()
    
    public func setup(image: UIImage) {
        self.image = image
        setup()
    }
