         setupToolbar()
         setupSlideImage()
         
-        slidingDetailView = SlidingSideView(slidingDetailAnchor ,withNormalHeight: 100.0, expandedHeight: 200.0)
-        slidingDetailView.backgroundColor = UIColor.clear
-        slidingDetailView.delegate = self
+        slidingSideView = SlidingSideView(slidingDetailAnchor ,withNormalHeight: 100.0, expandedHeight: 200.0)
+        slidingSideView.backgroundColor = UIColor.clear
+        slidingSideView.delegate = self
         
         //set layoutguides before adding as a subview
-        slidingDetailView.topLayouyGuide = self.topLayoutGuide
-        slidingDetailView.bottomLayoutGuide = self.bottomLayoutGuide
+        slidingSideView.topLayouyGuide = self.topLayoutGuide
+        slidingSideView.bottomLayoutGuide = self.bottomLayoutGuide
         
-        self.view.addSubview(slidingDetailView)
+        self.view.addSubview(slidingSideView)
         
         let contentView = UIView()
         contentView.backgroundColor = UIColor(red: 0.0, green: 129.0/255.0, blue: 213.0/255.0, alpha: 1.0)


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

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

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