 
 import UIKit
 
-public class ALSlidingNavigationBar {
+open class ALSlidingNavigationBar {
     var navigationBar: UINavigationBar!
     var navigationBarView: UIView!
     var navigationItem: UINavigationItem!
 
-    var anchorView: UIView?
-    var anchorOffsetY: CGFloat?
+    open var anchorView: UIView?
+    open var anchorOffsetY: CGFloat?
 
     public init(navigationBar: UINavigationBar, navigationItem: UINavigationItem, navigationBarView: UIView) {
         self.navigationBarView = navigationBarView

            )
        )

        if offsetY > 0 {
            self.navigationBarView.isHidden = false
        } else {
            self.navigationBarView.isHidden = true
        }
    }
}

        self.initializeSlidingNavbar()
    }

    open func setAnchor(offsetY: CGFloat) {
        self.anchorOffsetY = offsetY
        self.anchorView = nil
    }

    open func setAnchor(view: UIView) {
        self.anchorView = view
        self.anchorOffsetY = nil
    }

    open func initializeSlidingNavbar() {
        self.navigationBar.clipsToBounds = true
        self.navigationItem.titleView = self.navigationBarView
        self.navigationBarView.isHidden = true
    }

    open func didScroll(offset: CGFloat, convertView: UIView) {
        let anchorOffset: CGFloat = self.getAnchorOffset(convertView: convertView)

        let offsetY = min(self.navigationBarView.frame.height + self.navigationBar.frame.height, max(0, offset - anchorOffset))

