         return result
     }
 
-    // private functions
-    
-    private func updateCcIcon(ccType : String?) {
+    // private/internal functions
+    
+    func updateCcIcon(ccType : String?) {
         
         // change the image in ccIconImage
+        if let image = getCcIconByCardType(ccType: ccType) {
+            self.image = image
+        }
+    }
+    
+    /**
+     This function updates the image that holds the card-type icon according to the chosen card type.
+     Override this if necessary.
+     */
+    func getCcIconByCardType(ccType : String?) -> UIImage? {
+        
         var imageName : String?
         if let ccType = ccType?.lowercased() {
             imageName = ccImages[ccType]

import UIKit

/**
 This protocol should be implemented by the view which owns this component; Although the component's functionality is sort-of self-sufficient, we still have some calls to the parent
 */
protocol BSCcInputLineDelegate : class {
    /**

            }
        }
    }
    
    /**
     expPlaceholder (default = "MM/YY") determines the placeholder text for the EXP field
     */
    @IBInspectable var expPlaceholder: String = "MM/YY" {
        didSet {
            self.expTextField.placeholder = expPlaceholder
        }
    }
    /**
     cvcPlaceholder (default = "CVV") determines the placeholder text for the CVV field
     */
    @IBInspectable var cvcPlaceholder: String = "CVV" {
        didSet {
            self.cvvTextField.placeholder = cvcPlaceholder
        }
    }
    
    /**
     ccnWidth (default = 220) determines the CCN text field width in the "open" state (value will change at runtime according to the device)
     */
