     }
     
     //
-    //  MARK: - Button Taps
+    //  MARK: - Autolayout Support
+    //
+    
+    //
+    //  This method returns the intrinsic content size.
+    //
+    //  A FilterBar is always 44 points tall and stretches
+    //  just beyond either side of its superview.
+    //
+    
+    override func intrinsicContentSize() -> CGSize {
+        
+        var intrinsicWidth : CGFloat = CGRectGetWidth(UIScreen.mainScreen().bounds) + 2.0
+        
+        if let width : CGFloat = self.superview?.bounds.width {
+            intrinsicWidth = width + 2.0
+        }
+        
+        return CGSizeMake(intrinsicWidth, 44.0)
+    }
+    
+    //
+    //  This method ensures that the FilterBar is always used with autolayout.
+    //
+    
+    override class func requiresConstraintBasedLayout() -> Bool  {
+        return true
+    }
+    
+    //
+    //  MARK: - Handling Segment Taps
+    //
+    
+    //
+    //  This function changes the selected segment
+    //  index and updates the buttons.
     //
     
     func buttonWasTapped(button:UIButton) {

        
        if !containsWhiteView {
            if self.translucent {
                self.installWhiteView()
            }
            else {
                self.removeConstraints(_whiteOverlay.constraints())

        }
    }
    
    //  Translucency
    
    @IBInspectable var translucent : Bool = true {
        didSet {
            applyColor()
        }
    }
    
    //
    //  MARK: - Internal Overlays
    //
    
    private let _colorOverlay : UIView = UIView()
    private let _whiteOverlay : UIView = UIView()
    
    //
    //  MARK: - Initializers
