[ad_1]
I’m utilizing UIBarButtonItemAppearance for the primary time and I am confused on easy methods to put a customized picture for the again button.
That is how I do it:
personal func createBarButtonAppearence(_ coloration: UIColor, textColor: UIColor) -> UINavigationBarAppearance {
let look = UINavigationBarAppearance()
look.titleTextAttributes = [.foregroundColor: textColor]
look.largeTitleTextAttributes = [.foregroundColor: textColor]
look.configureWithOpaqueBackground()
look.backgroundColor = coloration
let again = UIBarButtonItemAppearance()
again.regular.backgroundImage = UIImage(named: "white_back_arrow")
look.backButtonAppearance = again
return look
}
This efficiently places the "white_back_arrow" picture because the again button however it additionally retains the unique iOS again button picture because it exhibits:
How can I keep away from this behaviour?
[ad_2]

