How would I hide the navigation bar once my imageView is tapped, the navigation bar messes up the view of the full screen image once my imageView is tapped and I would like it hidden when the image is tapped and to reappear once the image is dismissed. Here is my code for my image being tapped. 

```
//expandImage

@IBAction func expand(_ sender: UITapGestureRecognizer) {
    let imageView = sender.view as! UIImageView
    let newImageView = UIImageView(image: imageView.image)
    newImageView.frame = self.view.frame
    newImageView.backgroundColor = .black
    newImageView.contentMode = .scaleAspectFit
    newImageView.isUserInteractionEnabled = true
    let tap = UITapGestureRecognizer(target: self, action: #selector(dismissFullscreen))
    newImageView.addGestureRecognizer(tap)
    self.view.addSubview(newImageView)
}

func dismissFullscreen(_ sender: UITapGestureRecognizer) {
    sender.view?.removeFromSuperview()
}

```