how to fix the width of Xib based on device width? .I have created custom navigation bar with xib view ? but i am facing problem with width of the xib ? `func loadNavigation() {
self.navigationController?.navigationBar.isHidden = false
self.navigationController?.navigationBar.isTranslucent = false
self.navigationItem.hidesBackButton = true
self.navigationController?.navigationBar.addSubview(customNavigation.view)
customNavigation.leftBtn?.isHidden = false
customNavigation.rightBtn?.isHidden = false
customNavigation.titleLbl?.isHidden = false
customNavigation.titleLbl?.text = NSLocalizedString("Teacher Profile", comment: "")
customNavigation.leftBtn?.addTarget(self, action: #selector(PTeacherProfileViewController.BackAction(_:)), for: UIControlEvents.touchUpInside)
customNavigation.rightBtn?.addTarget(self, action: #selector(PTeacherProfileViewController.DownAction(_:)), for: UIControlEvents.touchUpInside)
}`
this is the way i am using navigation bar
view.frame.size.width = UIScreen.main.bounds.width