add action to image textfield

searchControl.backgroundColor = UIColor.whiteColor()
searchControl.placeholder = "Search item ..."
searchControl.font = UIFont.systemFontOfSize(14)
searchControl.contentVerticalAlignment = UIControlContentVerticalAlignment.Center
searchControl.rightViewMode = UITextFieldViewMode.Always;
searchControl.clearButtonMode = UITextFieldViewMode.Always;
let zoomGlass = UIImageView(image: UIImage(named: "search"))
zoomGlass.frame.size = CGSizeMake(zoomGlass.image!.size.width + 10, zoomGlass.image!.size.height)
zoomGlass.contentMode = UIViewContentMode.ScaleAspectFit
zoomGlass.userInteractionEnabled = true
zoomGlass.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(OrderResVC.buttonTapped(_:))))
searchControl.rightView = zoomGlass

let frame = CGRectMake(0, 0, self.view.frame.size.width, 50)
let view = UIView()
view.frame = frame
view.addSubview(searchControl)
self.tableView.tableHeaderView = view
self.tableView.tableHeaderView?.backgroundColor = UIColor.whiteColor()
self.tableView.tableHeaderView?.layer.borderWidth = 2
self.tableView.tableHeaderView?.layer.borderColor = UIColor(red: 240/255, green: 239/255, blue: 245/255, alpha: 1).CGColor
searchControl.snp_makeConstraints(closure: { (make) in
make.edges.equalTo(view).inset(UIEdgeInsetsMake(0, 10, 0, 10))
})