         if let style = delegate.tabControlView(indicatorSizeFor: self) {
             indicatorStyle = style
         }
+        
+    }
+    
+    public override func layoutSubviews() {
+        super.layoutSubviews()
+        if indicatorStyle == .some(.tabWidth) {
+            indicatorWidthConstraint.constant = view.bounds.width / CGFloat(segmentedControl.numberOfSegments)
+        }
     }
     
     override public func draw(_ rect: CGRect) {
-        
-        switch indicatorStyle {
-        case .some(.max):
-            indicatorWidthConstraint.constant = view.bounds.width / CGFloat(segmentedControl.numberOfSegments)
-        default:
-            break
-        }
-        
         setIndicatorPosition(forSegmentAt: segmentedControl.selectedSegmentIndex, animated: false)
     }
     

}

public enum NFTabControlViewIndicatorStyle {
    case custom(CGFloat)
    case max
    case dot
}



    }
    
    ///Apply delegate settings
    private func setup() {
        guard let delegate = delegate else {
            return
