 import UIKit
 
 /**
+ Enum to identify the type of icon
+ */
+public enum IconType {
+
+    case font
+    case image
+
+}
+
+/**
  A beautiful and flexible textfield implementation with support for icon, title label, error message and placeholder.
  */
 open class SkyFloatingLabelTextFieldWithIcon: SkyFloatingLabelTextField {
+    
+    /// A enum determining if user wants to use iconFont or iconImage
+    @IBInspectable
+    open var iconType: IconType = .font {
+    
+        didSet {
+        
+            switch self.iconType {
+            case .font:
+                self.iconLabel.isHidden = false
+                self.iconImageView.isHidden = true
+                
+            case .image:
+                self.iconLabel.isHidden = true
+                self.iconImageView.isHidden = false
+                
+            }
+        
+        }
+    
+    }
+    
+    /// A UIImageView value that identifies the view used to display the icon
+    open var iconImageView: UIImageView!
+    
+    /// A UIImage value that determines the image that the icon is using
+    dynamic open var iconImage: UIImage? {
+        didSet {
+            iconImageView?.image = iconImage
+        }
+    }
 
     /// A UILabel value that identifies the label used to display the icon
     open var iconLabel: UILabel!

    fileprivate func updateFrame() {
        let textWidth: CGFloat = bounds.size.width
        if isLTRLanguage {
            iconLabel.frame = CGRect(
                x: 0,
                y: bounds.size.height - textHeight() - iconMarginBottom,
                width: iconWidth,
                height: textHeight()
            )
        } else {
            iconLabel.frame = CGRect(
                x: textWidth - iconWidth,
                y: bounds.size.height - textHeight() - iconMarginBottom,
                width: iconWidth,
                height: textHeight()
            )
        }
    }
}

    required public init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        createIconLabel()
        createIconImageView()
        
        switch self.iconType {
        case .font:
            self.iconLabel.isHidden = false
            self.iconImageView.isHidden = true
        
        case .image:
            self.iconLabel.isHidden = true
            self.iconImageView.isHidden = false
            
        }
        
    }

    // MARK: Creating the icon label
