UIBarButtonItem *backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:nil style:UIBarButtonItemStylePlain target:self action:@selector(backAction:)];
UIImage *image = [UIImage imageNamed:@"navigationbar_back"];
[backBarButtonItem setBackButtonBackgroundImage:[image resizableImageWithCapInsets:UIEdgeInsetsMake(0, image.size.width, 0, 0)] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[backBarButtonItem setBackButtonTitlePositionAdjustment:UIOffsetMake(-400.f, 0) forBarMetrics:UIBarMetricsDefault];
backBarButtonItem.imageInsets = UIEdgeInsetsMake(0, -30, 0, 30);
self.navigationItem.backBarButtonItem = backBarButtonItem;
网友评论