[置顶] iOS 自定义导航栏的返回按钮

   UIBarButtonItem * item  =    [UIBarButtonItem appearance];
    UIImage* image = [UIImage imageNamed:@"back_icon"];
    
    [item setBackButtonBackgroundImage:[image resizableImageWithCapInsets:UIEdgeInsetsMake(0, image.size.width, 0, 0)] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
    //[item setBackButtonBackgroundVerticalPositionAdjustment:20.f forBarMetrics:UIBarMetricsDefault];
    [item setBackButtonTitlePositionAdjustment:UIOffsetMake(0.f, 0) forBarMetrics:UIBarMetricsDefault];

你可能感兴趣的:([置顶] iOS 自定义导航栏的返回按钮)