 
 extension DemoViewController: SlidingSideViewDelegate {
     
-    public func slidingDetailView(_ sdView: SlidingSideView, willSlideToState state: SlidingSideViewState) {
+    public func slidingSideView(_ sdView: SlidingSideView, willSlideToState state: SlidingSideViewState) {
         print("Will slide")
     }
     
-    func slidingDetailView(_ sdView: SlidingSideView, didSlideToState state: SlidingSideViewState) {
+    func slidingSideView(_ sdView: SlidingSideView, didSlideToState state: SlidingSideViewState) {
         print("Did slide")
     }
 }

        let labelTrailing = label.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: 0.0)
        NSLayoutConstraint.activate([labelCenter,labelLeading,labelTrailing])
        
        slidingDetailView.addSubview(contentView)
        configureViewLayout(view: contentView)
    
    }
    
    func normalSlide(_ sender: Any) {
        slidingDetailView.currentState = .normal
        label.text = String(format: "State: Normal, Height: %g", slidingDetailView.normalHeight)
    }

    func extendedSlide(_ sender: Any) {
        slidingDetailView.currentState = .expanded
        label.text = String(format: "State: Expanded, Height: %g", slidingDetailView.expandedHeight!)
    }
    
    func close(_ sender: Any) {
        slidingDetailView.currentState = .collapsed
        label.text = "State: Collapsed"
    }
    
    func configureViewLayout(view: UIView) {
        let top = view.topAnchor.constraint(equalTo: self.slidingDetailView.topAnchor, constant: 0.0)
        let bottom = view.bottomAnchor.constraint(equalTo: self.slidingDetailView.bottomAnchor, constant: 0.0)
        let leading = view.leadingAnchor.constraint(equalTo: self.slidingDetailView.leadingAnchor, constant: 0.0)
        let trailing = view.trailingAnchor.constraint(equalTo: self.slidingDetailView.trailingAnchor, constant: 0.0)
        NSLayoutConstraint.activate([top,bottom,leading,trailing])
    }
    


class DemoViewController: UIViewController {

    var slidingSideView: SlidingSideView!
    var slidingDetailAnchor: SlidingSideViewAnchor!
    var label: UILabel!
    
