         super.init(frame: frame)
         self.addSubview(self.backgroundView)
         self.addSubview(self.searchView)
-    self.backgroundView.addGestureRecognizer(UITapGestureRecognizer.init(target: self, action: #selector(Search.dismiss)))
+        self.searchView.addSubview(self.searchField)
+        self.backgroundView.addGestureRecognizer(UITapGestureRecognizer.init(target: self, action: #selector(Search.dismiss)))
+        self.searchView.addSubview(self.backButton)
     }
 
     required init?(coder aDecoder: NSCoder) {

        UIView.animate(withDuration: 0.3, animations: {
            self.backgroundView.alpha = 0.5
            self.searchView.alpha = 1
        })
    }
    

        UIView.animate(withDuration: 0.3, animations: {
            self.backgroundView.alpha = 0
            self.searchView.alpha = 0
            self.searchField.resignFirstResponder()
            }, completion: {(Bool) in
                self.delegate?.hideSearchView(status: true)
        })
