Это мой код для пользовательской кнопки возврата
func addBackButton() {
let backButtonView = UIView(frame: CGRect(x: 0, y: 0, width: 70, height: 44))
let imageView = UIImageView(image: UIImage(named: "back-arrow"))
imageView.frame = CGRect(x: -5, y: 11, width: 12, height: 22)
imageView.image = imageView.image!.withRenderingMode(.alwaysTemplate)
imageView.tintColor = .fiGreen()
let label = UILabel(frame: CGRect(x: 10, y: 0, width: 60, height: 44))
label.textColor = .fiGreen()
label.text = NSLocalizedString("back", comment: "Back")
backButtonView.addSubview(imageView)
backButtonView.addSubview(label)
backButtonView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(backButtonClicked)))
let barButton = UIBarButtonItem(customView: backButtonView)
navigationItem.leftBarButtonItem = barButton
}
Я думаю, вы можете изменить ее, чтобы получить необходимое смещение.