I added the following to customize my back button in my navigation bar but the image just overlaps/duplicated:
https://i.stack.imgur.com/eyzJC.png
- (void)viewWillAppear:(BOOL)animated
{
//take out the label following the button
UIBarButtonItem *backButton = [[UIBarButtonItem alloc]initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
//set image for back button
[[UINavigationBar appearance] setBackIndicatorImage:[UIImage imageNamed:@"backButtonImage.png"]];
[[UINavigationBar appearance] setBackIndicatorTransitionMaskImage:[UIImage imageNamed:@"backButtonImage.png"]];
self.navigationItem.backBarButtonItem = backButton;
}
It's supposed to be an image of one black arrow facing to the left.
Before it worked fine but now it does this when I simulate it. Any insight and help would be appreciated.
Thank you