iOS11后导航栏返回按钮自定义

    UIImage * backImage = [[UIImage imageNamed:@"title_back_icon"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    [UINavigationBar.appearance setBackIndicatorImage:backImage];
    [UINavigationBar.appearance setBackIndicatorTransitionMaskImage:backImage];

    if(@available(iOS 11, *)) {
        [[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor clearColor]} forState:UIControlStateNormal];
        [[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor clearColor]} forState:UIControlStateHighlighted];
    } else {
        [[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(-60, -60) forBarMetrics:UIBarMetricsDefault];
    }

[转自StackOverFlow](https://stackoverflow.com/questions/46193204/custom-back-indicator-image-and-ios-11)

你可能感兴趣的:(iOS11后导航栏返回按钮自定义)