在视图将要出现的时候
override func viewWillAppear(_ animated: Bool) {
self.navigationController?.navigationBar.setBackgroundImage(UIImage.init(named: "bgImageView.png"), for: UIBarPosition.any, barMetrics: UIBarMetrics.default)
self.navigationController?.navigationBar.shadowImage = UIImage.init()