设置所有页面导航栏
func setupNaviBar() {
let navigationBarAppearace = UINavigationBar.appearance()
// 设置 tintColor 为白色
navigationBarAppearace.tintColor = .white
// 设置 bar 的颜色为主题色
navigationBarAppearace.barTintColor = Global.ThemeColor
// 设置 title 的字体为白色
navigationBarAppearace.titleTextAttributes =
[NSForegroundColorAttributeName: UIColor.white]
let backImg: UIImage = UIImage(named: "btn-Left")!
.withRenderingMode(.alwaysOriginal)
// 设置返回按钮图片
UINavigationBar.appearance()
.backIndicatorImage = backImg
// 设置返回按钮图片
UINavigationBar.appearance()
.backIndicatorTransitionMaskImage = backImg
// 将返回按钮的字移到屏幕上面
UIBarButtonItem.appearance()
.setBackButtonTitlePositionAdjustment(UIOffsetMake(0, -100), for: .default)
}