统一修改 UINavigationBar backItem

{

    UINavigationBar * navigationBar = [UINavigationBar appearance];

    //返回按钮的箭头颜色

    [navigationBar setTintColor:[UIColor whiteColor]];

    //设置返回样式图片

    UIImage *image = [UIImage imageNamed:@"backArrow"];

    image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

    navigationBar.backIndicatorImage = image;

    navigationBar.backIndicatorTransitionMaskImage = image;

    

    

    UIBarButtonItem *buttonItem = [UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil];

    UIOffset offset;

    offset.horizontal = -500;

    [buttonItem setBackButtonTitlePositionAdjustment:offset forBarMetrics:UIBarMetricsDefault];

}

 

 

还有这里的方法

http://blog.csdn.net/zhangao0086/article/details/22432387

 

两个方法都不是特别的完美

后续补充

posted on 2016-10-22 18:47  景树园  阅读(382)  评论(0编辑  收藏  举报

导航