NavigationBarの< Backボタンを画像にする
コード
ViewController.swift
private func setNaviBackButton() {
let backImage = UIImage(named: "backIcon")?.withRenderingMode(.alwaysOriginal)
navigationItem.leftBarButtonItem = UIBarButtonItem.init(image: backImage, style: .plain, target: self, action: #selector(tappedBackButton))
}
@objc func tappedBackButton() {
self.navigationController?.popViewController(animated: true)
}