iOS 11 NavigationBar后退按钮问题

时间:2018-02-09 10:07:23

标签: ios uinavigationbar backbarbuttonitem

我在后面的ViewController viewDidLoad中设置了backbarbutton:

    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];
}

但我有一个小图标,但位置不正确 enter image description here

谁能给我一些提示,我花了整整一天时间来解决这个问题,但无法得到任何想法。

0 个答案:

没有答案