title: can we add line separator in custom navigation bar? how? in swift
body: <p><strong>I want navigation bar like below:</strong></p>
  <p><a href="https://i.stack.imgur.com/yyWIz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yyWIz.png" alt="enter image description here" /></a></p>
  <p>but with my code i am getting like this:</p>
  <p><a href="https://i.stack.imgur.com/uxlVA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uxlVA.png" alt="enter image description here" /></a></p>
  <p>for normal navigationbar code:</p>
  <pre><code> func setUpNavigationBar(){
      
      self.navigationController?.navigationBar.shadowImage = UIImage()
      self.navigationController?.navigationBar.backgroundColor = CommonColor.navigationColor
      self.navigationController?.navigationBar.barTintColor = CommonColor.navigationColor
      self.navigationController?.navigationBar.isTranslucent = false
      self.navigationController?.navigationBar.layer.masksToBounds = false
      self.navigationController?.navigationBar.layer.shadowColor = UIColor.black.cgColor
      self.navigationController?.navigationBar.layer.shadowOpacity = 0.2
      self.navigationController?.navigationBar.layer.shadowOffset = CGSize(width: 0, height: 2.0)
      self.navigationController?.navigationBar.layer.shadowRadius = 2
      
      self.navigationController?.navigationBar.layer.shadowRadius = 2
     
      
      let menuImageView = UIImageView.init(image: #imageLiteral(resourceName: &quot;menu8&quot;))
      menuImageView.tintColor = .darkGray
      menuImageView.frame = CGRect(x:0.0,y:0.0, width:25,height:25.0)
      menuImageView.contentMode = .scaleAspectFit
      menuImageView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(menuClick)))
      let btnMenu = UIBarButtonItem(customView: menuImageView)
      
      self.navigationItem.setLeftBarButton(btnMenu, animated: true)
              
      let logoImageView = UIImageView.init(image: #imageLiteral(resourceName: &quot;pic-logo&quot;))
      logoImageView.tintColor = .darkGray
      logoImageView.frame = CGRect(x:0.0,y:0.0, width:100,height:25.0)
      logoImageView.contentMode = .scaleAspectFit
      self.navigationItem.titleView = logoImageView
  
  
  }
  </code></pre>
  <p>with the above code i am not getting line in navigationbar.. how to add height 1 view line separater in navigationbar with code</p>
  <p>i am calling this in every <code>viewcontroller's viewwillappeadr **setUpNavigationBar**</code></p>