Wednesday, October 28, 2026
HomeiOS Developmentios - Utilizing UIBarButtonItemAppearance have each the system and the customized again...

ios – Utilizing UIBarButtonItemAppearance have each the system and the customized again button photographs

[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:

enter image description here

How can I keep away from this behaviour?

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments