         
         let height = keyWindow.frame.width * 9 / 16
         let tripHeaderFrame = CGRect(x: 0, y: 0, width: keyWindow.frame.width, height: height)
-        let tripHeader = TripHeader(frame: tripHeaderFrame)
+        tripHeader = TripHeader(frame: tripHeaderFrame)
         tripHeader.trip = self.trip
         tripHeader.tripDetail = self
         tripView.addSubview(tripHeader)

    }
    
    var tripView: UIView!
    var keyWindow = UIApplication.shared.keyWindow!
    
    func showTripDetai() {

    }
    
    func closeView() {
        self.tripView.backgroundColor = nil
        UIView.animate(withDuration: 1, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: {
            self.tripView.frame = CGRect(x: self.keyWindow.frame.width, y: self.keyWindow.frame.height, width: 0, height: 0)
            self.tripHeader.frame = CGRect()
        }, completion: { (completedAnimation) in
            UIApplication.shared.setStatusBarHidden(false, with: .fade)
        })
    }
    
}
