         }
     }
     
+    @IBInspectable var enableAutoShrink: Bool = false {
+        
+        didSet {
+            
+            label?.adjustsFontSizeToFitWidth = enableAutoShrink
+        }
+    }
+    
+    @IBInspectable var minimumFontScaleFactor: CGFloat = 1.0 {
+        
+        didSet {
+            
+            if enableAutoShrink {
+                label?.minimumScaleFactor = minimumFontScaleFactor
+            }
+            else {
+                label?.minimumScaleFactor = 1.0
+            }
+            
+        }
+    }
+    
     func updateView() {
         
         layer.cornerRadius = cornerRadius

            else {
                label.lineBreakMode = .byTruncatingTail
            }
        }
        
        self.imageView?.contentMode = .scaleAspectFill

import UIKit

@IBDesignable class CustomButtonView: UIButton {
    
    private var label: UILabel? { return titleLabel }
    
    override init(frame: CGRect) {
        
