1

I set backbarbutton in a base ViewController viewDidLoad like below:

    if (@available(iOS 11, *)) {

    UIImage *backButtonImage = [[UIImage imageNamed:@"icon_return"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    self.navigationController.navigationBar.backIndicatorImage = backButtonImage;
    self.navigationController.navigationBar.backIndicatorTransitionMaskImage = backButtonImage;

    self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
}

but I got a small icon, but is not in the correct position enter image description here

who can give me some tips, I have spent a whole day to solve this, but can not get any idea.

Faysal Ahmed
  • 7,501
  • 5
  • 28
  • 50
acoder
  • 249
  • 5
  • 14
  • Check the back button image size. This will help: https://stackoverflow.com/a/31808361/5167909 – Faysal Ahmed Feb 09 '18 at 10:17
  • The image size is 22*44 for 1x, 66*132 for 3x. But i found in Debug View Hierarchy got it 's frame is 22, 32.6667 – acoder Feb 11 '18 at 10:13

0 Answers0