 let kDefaultAnimationDuration: NSTimeInterval = 0.25
 
 public class SHSearchBar: UIView, UITextFieldDelegate {
-    private var backgroundView: UIImageView = UIImageView()
+    private(set) var backgroundView: UIImageView = UIImageView()
 
     public var cancelButton: UIButton = UIButton(type: .Custom)
     public var textField: UITextField = UITextField()
 
     // Constraints for showing and hiding the cancel button
-    private var bgToCancelButtonConstraint: NSLayoutConstraint!
-    private var bgToParentConstraint: NSLayoutConstraint!
+    private(set) var bgToCancelButtonConstraint: NSLayoutConstraint!
+    private(set) var bgToParentConstraint: NSLayoutConstraint!
     
     public var delegate: SHSearchBarDelegate?
     

    }
    
    public func textFieldShouldEndEditing(_ textField: UITextField) -> Bool {
        if let result = delegate?.searchBarShouldEndEditing?(self) where result {
            setCancelButtonVisibility(false)
            return result
        }
        setCancelButtonVisibility(false)

    // MARK: - UITextFieldDelegate
    
    public func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool {
        if let result = delegate?.searchBarShouldBeginEditing?(self) {
            if result {
                setCancelButtonVisibility(true)
            }
            return result
        }
        setCancelButtonVisibility(true)
