Default back button background image of UIBarButtonItem appears over my custom

157 Views Asked by At

In the AppDelegate I'm setting custom back button background image with UIAppearence.

[[UIBarButtonItem appearance] setBackButtonBackgroundImage:image forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:highlightedImage forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault];

In some cases after pushing view controller appears default back button background image over my custom.

1

There are 1 best solutions below

0
On BEST ANSWER

It helped me to hide default image.

[[UINavigationBar appearance] setTintColor:[UIColor clearColor]];