Создайте BaseViewController наподобие
class BaseViewConroller: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
navSetting()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
func navSetting() {
navigationController?.navigationBar.backIndicatorImage = #imageLiteral(resourceName: "backArrow").withRenderingMode(.automatic)
navigationController?.navigationBar.backIndicatorTransitionMaskImage = UIImage(named: "backArrow")
navigationItem.backBarButtonItem = UIBarButtonItem(title: "", style:
.plain, target: nil, action: nil)
navigationItem.backBarButtonItem?.tintColor = UIColor(red: 235/255, green: 235/255, blue: 235/255, alpha: 1)
}
}
Вы можете создать все свои контроллеры вида, как
class HomeViewController: BaseViewConroller {
...
}